standard library. Why take the pain of calculating the 'lot' variable, if it's never returned? I keep fixing it, then an update just undoes it.
This is a code extracted from ExpertMoney.mqh in the - Bug in strategy tester
- New Version of MetaTrader 4 Client Terminal Build 419
- Please help. Forex EA error string ErrorDescription (int) stdlib.ex4
Nelson :
This is a code extracted from ExpertMoney.mqh in the standard library . Why take the pain of calculating the 'lot' variable, if it's never returned? I keep fixing it, then an update just undoes it.
This is a code extracted from ExpertMoney.mqh in the standard library . Why take the pain of calculating the 'lot' variable, if it's never returned? I keep fixing it, then an update just undoes it.
Read the help: CExpertMoney
CExpertMoney
CExpertMoney is a base class for money and risk management algorithms.
It is necessary to use the heirs of the class. For example CMoneyFixedMargin:
//+------------------------------------------------------------------+ //| Getting lot size for open long position. | //+------------------------------------------------------------------+ double CMoneyFixedMargin::CheckOpenLong(double price,double sl) { if(m_symbol==NULL) return(0.0); //--- select lot size double lot; if(price==0.0) lot=m_account.MaxLotCheck(m_symbol.Name(),ORDER_TYPE_BUY,m_symbol.Ask(),m_percent); else lot=m_account.MaxLotCheck(m_symbol.Name(),ORDER_TYPE_BUY,price,m_percent); //--- return trading volume return(lot); }

Documentation on MQL5: Standard Library / Strategy Modules / Base classes for Expert Advisors / CExpertMoney
- www.mql5.com
CExpertMoney - Base classes for Expert Advisors - Strategy Modules - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Vladimir Karputov:
Read the help: CExpertMoney
It is necessary to use the heirs of the class. For example CMoneyFixedMargin:
Thank you. I'm trying to understand the entire structure of the standard library.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register