Experts: Advisor Based on RSI and Martingale

 

Advisor Based on RSI and Martingale:

"This advisor uses the RSI indicator to determine optimal entry and exit points in the market. A unique feature of the advisor is its martingale strategy, which allows for position reversal with an increased lot size during market reversals. The advisor offers flexible trading time settings: you can set a working time range and disable trading during specific hours to filter out news events."

Advisor Based on RSI and Martingale

Author: Yury Smagin

 
Thank you Yury I appreciate you posting this EA, It is great as a beginner to see how someone Else approaches the program structure
 
linfo2 #:
Thank you Yury I appreciate you posting this EA, It is great as a beginner to see how someone Else approaches the program structure

👍 You're welcome! Thank you for your words of support, they mean a lot to me! 🙌

 

Unfortunately it doesn't seem to work in the strategy tester, it runs, but it doesn't show any equity curve (and I made sure the account balance and lot size are correct)

 
phade #: Unfortunately it doesn't seem to work in the strategy tester, it runs, but it doesn't show any equity curve (and I made sure the account balance and lot size are correct)

Please show the tester log, it will help to find out the reason why it is not working for you.

 
Yury Smagin #:

Please show the tester log, it will help to find out the reason why it is not working for you.

Hi, I attached the tester log

Files:
20230916.log  20 kb
 
phade #:

Hi, I attached the tester log

Please try again, and set inpLog=true and  inpShortLog= true. And after that, please show log again

 
Yury Smagin #:

Please try again, and set inpLog=true and  inpShortLog= true. And after that, please show log again

The log was too big to upload, it shows the error:


 
phade #:

The log was too big to upload, it shows the error:

Looks like the reason is here:

double LotCheck(double lots)
  {
//--- calculate maximum volume
   double volume=NormalizeDouble(lots,2);
   double stepvol=m_symbol.LotsStep();
   if(stepvol>0.0)
      volume=stepvol*MathFloor(volume/stepvol);
//---
   double minvol=m_symbol.LotsMin();
   if(volume<minvol)
      volume=0.0;
//---
   double maxvol=m_symbol.LotsMax();
   if(volume>maxvol)
      volume=maxvol;
//---
   return(volume);
  }

Most likely, your lot in the settings is less than the minimum allowable

P.S. I'm not the author, I came here by chance😄

 
Vladislav Boyko #:

Looks like the reason is here:

Most likely, your lot in the settings is less than the minimum allowable

P.S. I'm not the author, I came here by chance😄

that looks like a mistake indeed


@Yury I think the code needs to be checked/reuploaded, there are also a lot of warnings when compiling

 
phade #:
that looks like a mistake indeed

If I guessed right, then this is mostly user error (incorrect settings). The expert did not try to send an order with an incorrect lot from the settings and this is already good. Therefore, I would not call this particular case an error of the advisor.

I have not tried to compile or run this. My comments only apply to the screenshot of the log you attached.

Reason: