You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I trying to code a type of "Envelope" that would use ATR to adjust its "deviation" from the Base SMA.
All Arrays present in the code have been Set as Index Buffers and are declared as dynamic.
Here my attemp at it:
Everything works fine if I input the Current Chart's TimeFrame in Inputs TimeFrame0 & TimeFrame1.
If you think I should add any info to this topic please let me know; it is my first post here and I am not used to the website.However, if I want the COG (envelope) to be calculated with H4 SMA (via TimeFrame0) and then display it on the H1 Chart, or any other combination of TimeFrame0 input that is not the current chart's TF, it really shifts the whole envelope and even makes it go off chart.
The ATR Value also changes at every bar on the H1 even if I input H4 Timeframe. Shouldn't it stay the same for 4 consecutive H1 bars? (especially since I am selecting the ATR value of the closed bar i+1?)
Thanks in advance for any help!