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
When I used the first way (period declared in the header), it worked. When I used the second, is not the line of the indicator. Even, I copy and pasted the 2 codes you placed, and the same thing happened.
?
Sorry. I forgot to take into consideration that the parameters A and B must be different. Otherwise, ATR1-ATR2=0
ATR1=iATR(NULL, PERIOD_CURRENT, A, i);
ATR2=iATR(NULL, PERIOD_CURRENT, B, i);
If A=B, then ATR1-ATR2=0, and then you will not be able to see the line of an indicator.
I can write 1 (where is "i") , and is happening the same.
when I change only period, it work:
But, How about if I want is ATR14 of previous candle and the previous to that one:
For example. Let says I do a ATR band (But is not drawing the lines):
When I write that is happening the same problem: it does not draw the line of the indicator.
With A and B are you refering to the candle (1, 2). I ask because "iATR(NULL, PERIOD_CURRENT, 1, i)" is not the format. Where do you write it?
This is the code I am using right now for the ATR band: