Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi
I have this indicator that I am building:
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) counted_bars=0;
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i = 0 ;i < limit ;i++)
{
arwUp = 0; arwDown = 0;
double MA_HIGH = iMA(Symbol(),0,20,0,MODE_WMA,PRICE_MEDIAN,i);
double MA_LOW = iMA(Symbol(),0,23,0,MODE_WMA,PRICE_MEDIAN,i);
if(Close > MA_HIGH && Open> MA_HIGH)
arwUp = iLow(NULL, 0, i+1);
if( Close < MA_LOW && Open< MA_LOW)
arwDown = iHigh(NULL, 0, i+1);
}
return(0);
}
The question is how do I stop the arrows from repeating on the next bar ?
Thanks