Sangmane
i can't make it repaint...
looking at the code, i can't see how it could possibly repaint bars in the past:
- start() is called at every new tick
- the for() loop will determine ("paint") only the bars that were not already painted, i.e all bars at first call (when loading the indi), then only the current bar at each new tick;
If past arrows disappear, it means that the contents of the CrossUp[] or CrossDn[] arrays (buffers) has changed, but this should not occur since the code only changes index [0] (=current bar) of these arrays at each new tick, and not the higher indexes (which each represent one bar in the past: [1] is the bar preceeding the current bar). I can't see how indexes >0 could be recalculated (after their first calculation at loading time).
I'll be happy to learn why it would do that.
Unless IndicatorCounted() would return silly values, making the for() loop multiple times in the same tick (recalculating multiple bars in the past) -- then ok, the use of global variables would be flawed.
But this would be due to a bug in MT4 itself!
That being said, i agree (as i already did) that Sidus indicator doesn't repaint, and gives the result we are looking for, so i guess we should just go on using this one; there's no use trying to fix V3 once more when we already have another one that satisfies everybody.
I like the image
Let me insist that I wasn't pointing the finger at anyone but only at the code. Do not feel concerned
SQ
i can't make it repaint...
looking at the code, i can't see how it could possibly repaint bars in the past:
- start() is called at every new tick
- the for() loop will determine ("paint") only the bars that were not already painted, i.e all bars at first call (when loading the indi), then only the current bar at each new tick;
If past arrows disappear, it means that the contents of the CrossUp[] or CrossDn[] arrays (buffers) has changed, but this should not occur since the code only changes index [0] (=current bar) of these arrays at each new tick, and not the higher indexes (which each represent one bar in the past: [1] is the bar preceeding the current bar). I can't see how indexes >0 could be recalculated (after their first calculation at loading time).
I'll be happy to learn why it would do that.
Unless IndicatorCounted() would return silly values, making the for() loop multiple times in the same tick (recalculating multiple bars in the past) -- then ok, the use of global variables would be flawed.
But this would be due to a bug in MT4 itself!
That being said, i agree (as i already did) that Sidus indicator doesn't repaint, and gives the result we are looking for, so i guess we should just go on using this one; there's no use trying to fix V3 once more when we already have another one that satisfies everybody.
QuoteDislikedIt is like point your index finger to someone, wile the remain four fingers pointed to you.
Let me insist that I wasn't pointing the finger at anyone but only at the code. Do not feel concerned
SQ