Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1189
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
Use OnTradeTransaction().
I trade through the CTrade bible
Please suggest an analog of MQL4 function MarketInfo(asymbol, MODE_MARGIN_REQUIRED) in MQL5.
I need to getthe amount of free funds needed to open 1 lot to buy.
I tried different variants of SymbolInfoDouble(symbol, ...) function in MQL5, I can't find the right variant, it returns 0 everywhere.
Here, but I use fxsaber function like this
I trade through the CTrade bible
Correct answer:
Forum on trading, automated trading systems and trading strategy testing
FAQ from Beginners MQL5 MT5 MetaTrader 5
Alexey Kozitsyn, 2020.03.03 17:28
Use OnTradeTransaction().
Why is it so: Help for theCTrade trade class, e.g. openingBuy position
BUT! Even this check will not be enough since only OnTradeTransaction() allows to get transactionTRADE_TRANSACTION_DEAL_ADD - adding a trade to history.
In general, a set is required - send trade request via CTrade, check for success at once and wait for theTRADE_TRANSACTION_DEAL_ADD transaction in OnTradeTransaction().
Please suggest an analog of MQL4 function MarketInfo(asymbol, MODE_MARGIN_REQUIRED) in MQL5.
I need to getthe amount of free funds needed to open 1 lot to buy.
I tried different variants of SymbolInfoDouble(symbol, ...) function in MQL5, I can't find the right variant, it returns 0 everywhere.
Correct answer:
Why so: Read theCTrade reference, e.g. opening aBuy position
BUT! Even this check will not be enough since only in OnTradeTransaction() we can get transactionTRADE_TRANSACTION_DEAL_ADD - adding a trade to history.
In general, we need a set - send trade request via CTrade, immediately check for success and then wait for transactionTRADE_TRANSACTION_DEAL_ADD in OnTradeTransaction().
thanks
In what format should the time for StringToTime() be?
Suppose I run genetic optimisation - how do I see the transaction log for each pass?
Pass through frames. Ready-made solution here.