Announcement

Collapse
No announcement yet.

simple efs: want to plot (close-open)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • simple efs: want to plot (close-open)

    I dont know much about efs so this is probably dumb question.

    All I'd like to do is plot a simple histogram showing the value for (close -open) for each bar. The code I have is below but nothing plots:

    var thisbar = (close-open);

    function preMain(){
    setStudyTitle("thisbar");
    setPlotType(PLOTTYPE_HISTOGRAM);
    }

    function main(){
    return thisbar;
    }

    What am I doing wrong/ not doing?

  • #2
    trapper
    var thisbar = (close-open) should be changed to var thisbar = (close(0)-open(0)) and moved inside the main function. Once you implement these two changes it should work
    Alex

    Comment


    • #3
      Thanks Alex - thats it.

      Comment

      Working...
      X