Hello,
I use the ADX Wilder buffer in my EA and realize that value in the array for the current bar [0] is different from the value I see in the data window of Strategy Tester, for the same bar. Values [1] and [2] are correct. For example the Data Window shows :
- ADX Wilder(14) = 46.70 (for bar EURUSD, M1, 2013.08.01 00:45:00) and array ADXWilderMain[0] returns 51.42
- ADX Wilder(14) = 48.96 (for bar EURUSD, M1, 2013.08.01 00:44:00) and array ADXWilderMain[1] returns 48.96
- ADX Wilder(14) = 46.30 (for bar EURUSD, M1, 2013.08.01 00:43:00) and array ADXWilderMain[2] returns 46.30
DI+[0] and DI-[0] are also wrong and DI+[1] and DI-[1] are correct...
This is a problem for detecting buy or sell signal at the right bar. Please find bellow the code I use to handle the indicator and copy buffer. I use the GetIndicatorBuffer header. It is not clear for me what is going wrong. Clue from experimented people would be appreciate a 0.1 lot :)
Thank you
Vivaldi
Bar with index 0 is current bar, so ADX Wilder for this bar is always changing (on each tick). How do you know 46.70 and 51.42 are values produced at the same tick ?
Bar 1, 2, etc...are closed bars so the values doesn't change anymore.
Hi,
Thank you it is more clear for me now. I understand that value in Data Window correspond to value of the bar after it is close, unlike value [0] that returns value of one tick of the current bar.
I suppose that signal detection based on indicator value must be performed on the previous bar with value [1] as the most recent data, m'I right ? I think like this because value 0 returns only one value for one tick, and in my case it does not fill the condition for signal detection. Some variable are then reseted and I lost the trend information.
Vivaldie
Hi,
Thank you it is more clear for me now. I understand that value in Data Window correspond to value of the bar after it is close, unlike value [0] that returns value of one tick of the current bar.
I suppose that signal detection based on indicator value must be performed on the previous bar with value [1] as the most recent data, m'I right ? I think like this because value 0 returns only one value for one tick, and in my case it does not fill the condition for signal detection. Some variable are then reseted and I lost the trend information.
Vivaldie

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I use the ADX Wilder buffer in my EA and realize that value in the array for the current bar [0] is different from the value I see in the data window of Strategy Tester, for the same bar. Values [1] and [2] are correct. For example the Data Window shows :
- ADX Wilder(14) = 46.70 (for bar EURUSD, M1, 2013.08.01 00:45:00) and array ADXWilderMain[0] returns 51.42
- ADX Wilder(14) = 48.96 (for bar EURUSD, M1, 2013.08.01 00:44:00) and array ADXWilderMain[1] returns 48.96
- ADX Wilder(14) = 46.30 (for bar EURUSD, M1, 2013.08.01 00:43:00) and array ADXWilderMain[2] returns 46.30
DI+[0] and DI-[0] are also wrong and DI+[1] and DI-[1] are correct...
This is a problem for detecting buy or sell signal at the right bar. Please find bellow the code I use to handle the indicator and copy buffer. I use the GetIndicatorBuffer header. It is not clear for me what is going wrong. Clue from you guys would be appreciate a 0.1 lot :)
Thank you
Vivaldi