How do I retrieve data from an indicator? - page 7

 
Retabs:

Thank you for your reply. Just now and I have come up with solutions myself, but on a different principle. Tried mine and yours, seems to be correct.

But here is the thing: in the visual crossover point, the lines are actually crossed more than once, therefore the signal is received several times and the Expert Advisor has time to place 4-30 orders.

We have to get rid of this drawback. The only thing I have invented is to average previous readings and compare them with present ones. Logically, yes. But how can I do that programmatically? Help!


A wise, experienced trader will take the data from the previous bar (already closed), rather than from zero, to avoid dozens of false crossovers from "chattering" of indicator lines on the still alive bar. The apparent loss of benefit from the later indicator signal is nothing more than an illusion. But the "missed" loss from false signals is real, and it is much less if the crossing is made on a closed bar.
 
evillive:

A wise, experienced trader will take the data from the previous bar (already closed), rather than from zero, to avoid dozens of false crossings from "chattering" of indicator lines on the still alive bar. The apparent loss of benefit from the later indicator signal is nothing more than an illusion. But the "missed" losses from false signals are real, and their number is much smaller if the crossing is made on a closed bar.
the easiest way is to use the opening price of the current bar
Reason: