Rockwell ADR stop and target indicaor - not calculating correctly
For some reason the StopTargetInfo indicator is not calculating the Average Daily Range correctly.
The daily range is supposed to be the overnight and day session range from High-Low.
The idea behind this is that the stop is supposed to be 10% of the 7day ADR and the target is 15% of the 7day ADR.
I've attached the EvtADR indicator that DOES calculate ADR correctly for reference.
I posted this in the NT forum as well but if anyone wants to take a stab at this, feel free.
The following 3 users say Thank You to Jason11 for this post:
Here is my best attempt, I believe I have it working although I'm not a NinjaScript programmer. I modified the script to also display the ADR so we can always check if it's being calculated correctly. See how it works out for you.
The following 7 users say Thank You to mlarocco for this post: