Hello all,
I have done a simple indicator ; a kind of alligator cross arrow.
Same MA with , , and .
But i have tested it, and i saw that sometimes, an arrow disappear one or two candles after.
As i am not an experienced coder, i need help again to fix, and not recalculate or repaint when a an arrow is drawn on closed candle.
Thank you.MadaForex
Index mean one bar into the future. That is the reason why it repaints as you described
I suppose it's because if this line
for(int i=limit; i>=0; i--)
"i" should be superior or equal to zero.
What should i write ?
I suppose it's because if this line
for(int i=limit; i>=0; i--)
"i" should be superior or equal to zero.
What should i write ?You should avoid indexes like i-1 (for example Close is the first future Close price relative to the currently calculated bar)
Ok, thought it was the past candle.
And please, how can draw the cross over of this :
2EMA (shift=0) > 2EMA (shift=+1)
&&
2EMA (shift=0) > 2EMA (shift=-1)
Like the attached image ?
forgot to post my code sorry :
attached
Ok, thought it was the past candle.
And please, how can draw the cross over of this :
2EMA (shift=0) > 2EMA (shift=+1)
&&
2EMA (shift=0) > 2EMA (shift=-1)
Like the attached image ?
I am afraid but I do not understand the idea
Do you mind explaining a bit more ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello all,
I have done a simple indicator ; a kind of alligator cross arrow.
Same MA with , , and .
But i have tested it, and i saw that sometimes, an arrow disappear one or two candles after.
As i am not an experienced coder, i need help again to fix, and not recalculate or repaint when a an arrow is drawn on closed candle.
Thank you.