Expression with ADX and DI

How can I write Buy Expression when :

ADX (14) > 10 AND +DI > 20

Sell When

ADX (14) > 10 AND -DI > 20

1 Like

Buy Expression:

ADX(14) > 10 AND DIP(14) > 20   

Sell Expression
;

ADX(14) > 10 AND DIN (14) > 20
1 Like

Actually, I never found any single ADX indicator function in the entire Tradescript manual. Same with ATR, which is used to calculate ADX. I have managed to code a custom ATR strategy using 14 periods as reference. I will share that EA in this forum, and I am also working on coding a custom ADX based EA for Zerodha Pi. I need some help with the ADX formula. As soon as someone posts a detailed formula here I will put my ADX based code on the forum.