if (iRSI(NULL,0,4,PRICE_CLOSE,1+i) > 50) // First condition true
int I=i+2;
while(I < 200)
{
if(iRSI(NULL,0,4,PRICE_CLOSE,I) < 30) //Second condition true
{
Buffer1[i] = High[i] ; //Show Buffer
break; //exit cycle While
}
I++;
}
thanks for the quick answer but unfortunately it does not work, press the buffer on each candle
Brakets?
if (iRSI(NULL,0,4,PRICE_CLOSE,1+i) > 50) // First condition true{
int I=i+2;
while(I < 200)
{
if(iRSI(NULL,0,4,PRICE_CLOSE,I) < 30) //Second condition true
{
Buffer1[i] = High[i] ; //Show Buffer
break; //exit cycle While
}
I++;
}
}
thanks for the quick answer but unfortunately it does not work, press the buffer on each candle
Try this :
{ int i=2; for (; i<Bars && iRSI(NULL,0,4,PRICE_CLOSE,i)>30; i++); if (i<Bars) buffer[i] = High[i]; }
Try this :
{ int i=2; for (; i<Bars && iRSI(NULL,0,4,PRICE_CLOSE,i)>30; i++); if (i<Bars) buffer[i] = High[i]; }
It is not clear what you are trying to do.
Your code simply checks if the last closed bar is above RSI 50 and any of the previous 200 bars are below RSI 30.
I don't know what that means
if you change
to
It is not clear what you are trying to do.
Your code simply checks if the last closed bar is above RSI 50 and any of the previous 200 bars are below RSI 30.
He wants like this.
1) If prevoius bar rsi >50
2) after that fount bar where rsi<30 and put there arrow
He wants like this.
1) If prevoius bar rsi >50
2) after that fount bar where rsi<30 and put there arrow
If that is the case
instead of
it should be
He wants like this.
1) If prevoius bar rsi >50
2) after that fount bar where rsi<30 and put there arrow
1) Candle 1 RSI > 50
2) Research of the first candle back with RSI <30 and put arrow in candle 0
3) end search and exit cylce for
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Unfortunately the while loop you just can not make it work. I would like to run this code. the RSI to candle 1 must be above level 50, now start the while loop that will search the first candle back in the graph is below the level 30.
But the desired result is not correct, where am I wrong?
Thank you all for the replies.
if (iRSI(NULL,0,4,PRICE_CLOSE,1+i) > 50) // First condition true
int I=2;
while(I++ < 200)
{
if(iRSI(NULL,0,4,PRICE_CLOSE,I) < 30) //Second condition true
{
Buffer1[i] = High[i] ; //Show Buffer
break; //exit cycle While
}