Hello all,
I need to resolve a problem that is difficult to describe so bear with me a moment. I wrote an EA that enters a position based on a close beyond a predetermined threshold. The EA monitors the close iClose (NULL,0,1); for an entry trigger beyond the threshold.
Every so often a "Phantom" close price will trigger an entry. I call it "Phantom" because the close price that triggered the entry is NOT the close price on the chart OR the close price that shows on comments that monitor that. It is abolustely wrong. I programed the EA to print the closing price and threshold upon entry and have found that when this happens the closing price triggering the entry was completely wrong.
When I try to reproduce the problem, (by taking the EA off the chart and reapplying it), nothing happens the EA works as it was programmed. So I cannot diagnose what is causing the problem. VERY FRUSTRATING.
The bad part is when this happens on a live chart I am stuck closing out a loser (messing up my win stats) when the logic should not have allowed an entry in the first place were it not for this "Phantom" number.
So my question is...where does this number come from? Does the data stream or a chart sometimes generate a random number? Have any of you encountered anything like this? Could there be a small corrupt character in the EX4 file when I compile?
Can anyone suggest any ideas?
I need to resolve a problem that is difficult to describe so bear with me a moment. I wrote an EA that enters a position based on a close beyond a predetermined threshold. The EA monitors the close iClose (NULL,0,1); for an entry trigger beyond the threshold.
Every so often a "Phantom" close price will trigger an entry. I call it "Phantom" because the close price that triggered the entry is NOT the close price on the chart OR the close price that shows on comments that monitor that. It is abolustely wrong. I programed the EA to print the closing price and threshold upon entry and have found that when this happens the closing price triggering the entry was completely wrong.
When I try to reproduce the problem, (by taking the EA off the chart and reapplying it), nothing happens the EA works as it was programmed. So I cannot diagnose what is causing the problem. VERY FRUSTRATING.
The bad part is when this happens on a live chart I am stuck closing out a loser (messing up my win stats) when the logic should not have allowed an entry in the first place were it not for this "Phantom" number.
So my question is...where does this number come from? Does the data stream or a chart sometimes generate a random number? Have any of you encountered anything like this? Could there be a small corrupt character in the EX4 file when I compile?
Can anyone suggest any ideas?