My indicator
Anyone help me to identify problem with my indicator.
As in the picture, the left red circle is false signal happen when begin new bar.
After I refresh the indicator back to normal as in the right red circle.
You have a bug in your code . . . . take a look at line 23.

For large amounts of code, attach it
- You should always count down. If one buffer depends on another, you must count down to do it in one pass. Alternatively, must use multiple passes.
- No need to decrement counted_bars: Contradictory information on IndicatorCounted() - MQL4 forum
int counted_bars = IndicatorCounted(); // If you look back on earlier bars, e.g. Moving average // if (counted_bars < LOOK_BACK) counted_bars = LOOK_BACK; for (int i = Bars-1-counted_bars; i>=0; i--){ :
The problem was solved. Thank you very much.
But I got the other problem occur.
The value different after I refresh it. Such as before refresh is 0.2563 and after refresh is 0.2760 etc.
As in the picture below. The Above is before refresh and below is the after refresh.

How to fix it?
Anyone help me to identify problem with my indicator.
As in the picture, the left red circle is false signal happen when begin new bar.
After I refresh the indicator back to normal as in the right red circle.