At Line 5 he defined …
StocK = Stochastic[15,3](close)
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 ?
Hi
Please how do I show if the MACD is above or below the MACDSignal line.?
There you go:
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 …
Snippet Link Library