ATR Stop Indicator

 

I had been thinking on how to make this indicator. In EA its easier, but im new in using array in making an indicator.

ATRresistance=high+ATR. 
Its like a stop loss
ATRresistance line can only move down.
If the latest ATRresistance is higher, it will take the previous value.
Unless it is pushed up by the price high itself.

ATRsupport is the reverse. 


Any advice? 

 

 

 

It seems very similar to a "Chandelier Exit" but possible your idea is in reverse!

Here is a link from the Code Base, but it is coded in the old style: https://www.mql5.com/en/code/7249

So do a search here and on Google to see if you find one in the new style of MQL4+ coding.

Reason: