if(currdir!=prevdir)
Your indicator uses global/static variables. The precondition is prevdir is the value from the previous bar. That means you can process bar zero at most once.
Either change your loop, make your variable a buffer so you can restore the variable from the previous bar, or save currdir to prevdir except on bar zero.
Your indicator uses global/static variables. The precondition is prevdir is the value from the previous bar. That means you can process bar zero at most once.
Either change your loop, make your variable a buffer so you can restore the variable from the previous bar, or save currdir to prevdir except on bar zero.
aha Thanks but Can you Please guide me more?
i didnt compeletely understand which line should i edit ?!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi , I need Some Help
This indicator is Called TCCI and it's Using iMA Function,
the Problem is when i want to add UpWard Or DownWard Arrows To it , it Show's Continuing Arrows! ( For Example the Shows DownWard Arrow in Every Candle until the Signal Changes To Upward )
i want it to show arrows only at the first Candle of Signal change!
can anybody help me ?
i used "DRAW_ARROW" but nothing happened!
thanks