Simple code returns error message
- This topic has 21 replies, 4 voices, and was last updated 5 years ago by .
Similar topics:
Forums › ProRealTime English forum › ProOrder support › Simple code returns error message
Yes, he can use StocK.
I think the error is at line 15,
Line 8 is logically incorrect, since the average after > will always return 3 but it should not be reported as an error.
Thank you Roberto
I was trying to describe a rising 50 moving average.
Would If avg[50](close)>avg[50][3] then….. be correct.
I know the trailing moving average omits (close) because it’s already
happened, I got the wrong brackets for the 3 which was supposed to be 3 candles back.
back.
The StocK>80 then…. line did work .
Is all this correct ?
There you go:
1 2 3 4 5 |
MyMACDmainline = MACDline[12,26,9](close) //difference between the two EMA's MyMACDsignal = ExponentialAverage[9](MyMACDmainline) //ema of the above line (MyMACDmainline) MyMACDhistoGram = MACD[12,26,9](close) //histogram AboveMACD = MyMACDmainline > MyMACDsignal BelowMACD = MyMACDmainline < MyMACDsignal |
you can use variables AboveMACD and BelowMACD in your code (in the above code the histogram is not used, if you don’t need it you may want to either remove or comment out line 3).
Above added as Log 203 in here …
Find exclusive trading pro-tools on