I hope someone can help me with the next Problem....
I want to Create a Text Object above the current bar when my state is true.
But when the condition becomes true it will create 3 object back to my current bar. I have attached a screenshot of my chart. The state becomes true when the quicker stochastics crosses the signal line. But you will realize that the text objects will be 3 bars sooner.
Am I doing something incorrect? Please be patient. . I am new to coding.
// ------------------------------------------------------------------
//| Custom indior iteration function |
// ------------------------------------------------------------------
int start()
//bars count
int limit, I, counter;
int counted_bars=IndiorCounted();
//-- check for possible errors
if(counted_barslt;0) return(-1);
//-- last counted bar is going to be recounted
if(counted_barsgt;0) counted_bars--;
//--
limit=Bars-counted_bars;
//--
for(I = 0; I lt;= limit; I )
counter=I;
Range=0;
AvgRange=0;
for (counter=I ;counterlt;=I 49;counter )