|
Ok; firstly, of course, the displayed indicator is a different instance of that indicator from the instance that the EA uses. You would like them to present the same indications, but they don't, for a relatively simple but highly technical reason; namely that they are invoked in different ways.
If we fast-forward past the long-winded explanation, you end up with the concern I brought up initially; namely that through the EA, the indicator is queried again and again and with changing result while the most recent bar is being built. In particular, it makes signals as soon as the condition holds, even if it doesn't hold when the bar is complete.
The displayed indicator appears to only use the completed bar data.
Actually from looking mor closely at the code, I think the combined indicator is doubly weird in that it for bar 0 pulls iADX values relating to the close of bar -1 as well as close of bar 0. Does iADX predict bar close that well? The close of bar -1 is almost 2 hours from now, at least when bar 0 is just started.
Basically "close of bar 0" is the always changing "last tick price", until this bar becomes bar 1. And bar -1 is a figment of imagination whose close price is (highly?) uncertain.
Thus, as I understand it, the combined indicator should be changed to not set signals on bars 1 and 0, but it should set it on bar 2 (if the condition holds). As a consequence, the EA can only discover such a signal 2 bars behind, i.e. 1 hour after the close of the bar that is marked; i.e., it should look for the bar 2 signal.
|