i programmed an indicator; i then basically copied everything from the indicator and replaced 'i' (my looping variable) by '1' (the last bar) and put it in an expert advisor. all the settings are exactly the same. however, when i run the EA in visual mode, it misses some of the trades that the indicator signals (the indicator is a 'buy' or 'sell' one). the EA doesn't trade randomly (i.e. it only trades when there is a signal), but it misses some signals. any idea on how to fix this?