- Experts: Hedging Martingale
- CFD Possible Patterns
- Signals : Ask & Say Anything & Everything About MQL5 Trading Signals
Hello ,
Thanks for your reply
May be should use
long l = SymbolInfoInteger(NULL, SYMBOL_TRADE_CALC_MODE);
with :
SYMBOL_CALC_MODE_CFDINDEX SYMBOL_CALC_MODE_CFDLEVERAGE SYMBOL_CALC_MODE_CFD
But how to call these identifiers.
Is it the way to use these instructions :
double initial_margin_rate = SymbolInfoDouble(NULL, SYMBOL_MARGIN_INITIAL); double mainteance_margin_rate = SymbolInfoDouble(NULL, SYMBOL_MARGIN_MAINTENANCE); bool b = SymbolInfoMarginRate(NULL, ORDER_TYPE_BUY, initial_margin_rate, mainteance_margin_rate)
ok
regards
- 2023.07.05
- www.mql5.com
Has anything changed with this topic?
By changed, I mean is there now a universal method all MQL5 programmers can use to calculate margin in their accounts currency, discover applicable leverage for their accounts regardless of symbol, a best way to determine minimum lot sizes, tick values, etc....?
I have seen multiple forum threads on these topics, and I am wondering if a Best Known Method (BKM) has evolved that everyone can use?
I am studying the ExpertMoney.mqh, NTC_GetLeaverage.mqh, NTC_GetExchangeRate.mqh, Accountinfo.mqh, and SymbolInfo.mqh files and their associated classes to determine the best coding course of action.
Some classes appear to overlap functionality. An example of that would be CSymbolInfo.MarginLong() and CAccountInfo.MarginInitial()
Is there a Golden Path of Coding Righteousness for selecting what classes to use for optimum Expert Advisor functionality, safety and minimal computational overhead ?
I appreciate that this is a complex question.
Thanks for your thoughts, suggestions, and advice.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use