My requirement:
BUY: +Di above -DI, ADX above 20 and MACD above MACD signal line
SELL: -Di above +DI, ADX below 20 and MACD below MACD signal line
Code received
Buy Script:
ADX(14)>20 AND DIP(14) > DIN(14) AND MACD(13, 26, 9, SIMPLE) > MACDSignal(13, 26, 9, SIMPLE)
Sell Script:
ADX(14)<20 AND DIP(14) < DIN(14) AND MACD(13, 26, 9, SIMPLE) < MACDSignal(13, 26, 9, SIMPLE)
On 03-08-2015 CANBK there was a buy signal generated with MACD crosing the signal line and +di above -di and adx above 20.
But with the above code its not reflected in the back test. pls. check and let me know.