trader48 1 posts msg #121954 - Ignore trader48 |
11/7/2014 1:00:13 PM
Hi
I wrote this code to draw monthly pivot in a chart:
set{mh,date(monthend,high 21 day high)}
set{ml,date(monthend,low 21 day low)}
set{cl,date(monthend,close)}
set{summ,mh+ml+cl}
set{pivt, summ /3}
Show stocks where the close is between 10 and 5000
and average volume(10) is above 500000
and draw pivt
It always gives me error without any result.
I debugged it and I found that stockfetcher does not find any error in the first 3 lines.
But it gives me error on 4th line,where I try to add 3 variables.
It is confusing ,because I don`t see mistake on 4th line.
Then just for the pupose of testing,I just removed last variable in 4th line and changed the code to
set{summ,mh+ml}
Now it DOES give me results!!!!!!!!!!!
Does anyone has any idea?
What would be a proper code for finding monthly pivots?
Greatly appreciated
|
mahkoh 1,065 posts msg #121955 - Ignore mahkoh modified |
11/7/2014 2:15:23 PM
set{summ,mh+ml+cl}
change this to
set{summ1,mh + ml}
set{summ,summ1 + cl}
use
draw price line at pivt
to draw the pivot line in the chart
by the way, October had 23 trading days, not 21
|