Help new EA

 

Hi,

it is my first message and I first would like to congratulate you guys for his fantastic forum.


I am trying to introduce the following condition into my EA but I have got confused.

I would like to enter long if: RSI of Current Bar is > of RSI of previous Period (x). Let's say the last 14 days.

Same thing for long position.


Any help would be appreciated.

Thanks in advance.

Ogeid

 

Well...

double rsiArray[14];

for(int i = 1; i < 15; i++){

rsiArray[i-1] = iRSI(Symbol(), Period(), 14, 0, i);
}
double rsiMax = ArrayMaximum(rsiArray);

if(iRSI(Symbol(), Period(), 14, 0, 0) > rsiMax){
   ... enter trade
 
phy:

Well...

Thanks a lot.

Appreciate it.

Reason: