Forum

Calculating lot size based on Risk

I am currently testing an EA which I have converted from MQL4 code to new MQL5 code. Things generally work but the lot size calculation (based on a fixed risk percentage) is off: double subGetLotSize ( const string sSymbol, const double dRiskPercent, const bool bAccountIsMicro= false ) export {

MQL5 Backtest Report: Deals vs Trades?

Hi, I'm backtesting an EA which does quite a few trades (as confirmed by the visual mode in strategy test and the specific reports under the 'Backtest' panel). The backtest report, however, shows me this: In text form: Total Trades: 2 Total Deals: 101 Basically, the bulk of the trades register as