I need the buy also to take into consideration certain indicator values.
I used MACD, Stochastic, EMS and SMA values to the code but the results does not seem to take into account the indicator values.
I will be grateful if anybody can help me please. Sure I’m just missing some small change to the existing code.
Thank you.
What I tried (with my limited knowledge of code).
No matter which direction I set the < or > the results stays the same which tells me what I do isn’t working ;-(
indicator1 = MACDSignal[2,26,9](close)
indicator2 = MACDline[2,26,9](close)
indicator3 = MACD[2,26,9](close)
mac = (indicator2 > indicator1) //used all combinations > < here which does not have an effect.
indicator4 = Stochastic[14,3](close)
indicator5 = Stochastic[14,7](close)
stoch = (indicator5 > indicator4) //used all combinations > < here which does not have an effect.
indicator6 = Average[20](close)
indicator7 = Average[50](close)
aver1 = (indicator6 < indicator7) //used all combinations > < here which does not have an effect.
indicator8 = ExponentialAverage[20](close)
indicator9 = ExponentialAverage[20](Open)
ema = (indicator10 > indicator11) //used all combinations > < here which does not have an effect.