- Questions from a "dummy"
- I need a simple EA
- An MQL4 function
You can search the codebase for RSI EAs. Or try to fix your EA and show the code here if it doesn't work. The code to limit the Buys/Sells to a certain number is easy to implement.
int CountOpenBuys() { int buys=0; for(int i=PositionsTotal()-1;i>=0;i--) { if(PositionGetSymbol(i)!=_Symbol || PositionGetInteger(POSITION_MAGIC)!=MagicID) continue; if(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY) buys++; } return buys; }
You can search the codebase for RSI EAs. Or try to fix your EA and show the code here if it doesn't work. The code to limit the Buys/Sells to a certain number is easy to implement.
You can search the codebase for RSI EAs. Or try to fix your EA and show the code here if it doesn't work. The code to limit the Buys/Sells to a certain number is easy to implement.
You can search the codebase for RSI EAs. Or try to fix your EA and show the code here if it doesn't work. The code to limit the Buys/Sells to a certain number is easy to implement.
This is the EA by the way. Can you fix it?
We can assist you in fixing but the job is on you. I recommend to try an EA from Sergey's thread, and adapt it to your needs where required.
CopyBuffer(myRSIDefinition,0,0,3,myRSIArray); // calculate the curernt RSI Value double myRSIValue=NormalizeDouble(myRSIArray[0],2);
After that copy command your buffer looks like so: [0] -> RSI of 2nd last candle, [1] -> RSI of last candle, [2] -> RSI of current candle.
Either copy only one value and get it from [0], or leave it as is and get the current RSI from [2].

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use