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
MQL5 has built-in memory monitoring: https://www.mql5.com/ru/docs/standardlibrary/tradeclasses/cterminalinfo/cterminalinfomemoryused
Please advise how to check the conditions in the code, e.g:
CSymbolInfo m_symbol;
m_symbol.Bid()
In the tester (All ticks, M1) I get that it is not the current bid but the opening price of the bar. Maybe I missed something? How do I correctly check price on ticks to get correct results in the tester?
I am using the standard library to get the current bid:
CSymbolInfo m_symbol;
m_symbol.Bid()
In the tester (All ticks, M1) I get that it is not the current bid but the opening price of the bar. Maybe I missed something? How do I correctly check price on ticks to get correct results in the tester?
I open a trade using CTrade with a stop loss.
And how can I catch the moment of closing a deal by Stop Loss in OnTrade or OnTransactionTrade method?
I know the ticket, I know the dial, but they are always different in OnTransactionTrade (although I understand why)
I open a trade using CTrade with a stop loss.
And how can I catch the moment of closing a deal by Stop Loss in OnTrade or OnTransactionTrade method?
I know the ticket, I know the dial, but they are always different in OnTransactionTrade (although I understand why)
According to the comment we can find out if the position has been closed by Stop Loss/TakeProfit. For Stop Loss check the comment sl, and for Take Profit check the tp.
I thought about the comment, but as far as I remember the comments can be changed by the server.
In general, I don't care if it is closed by stoploss, takeprofit or manually.
The main thing is to identify the moment of closing of a certain order.
I thought about the comment, but as far as I remember the comments can be changed by the server.
In general, I don't care if it is closed by stoploss, takeprofit or manually.
The main thing is to identify the moment of closing of a certain order.
You can also use identifier DEAL_ENTRY_OUT from enumeration ENUM_DEAL_ENTRY to understand that the position has been closed.
Reference: Properties of trades.
Hello!
I have an EA in MQl4 which needs to be converted to MQL5. Please help me to understand CopyBuffer() function.
In MQl4, the code looks like this:
In MQL5 it looks like this. The 'CopyBuffer' error - no one of the overloads can be applied to the function call.
Hello!
I have an EA in MQl4 which needs to be converted to MQL5. Please help me to understand CopyBuffer() function.
In MQl4, the code looks like this:
In MQL5 it looks like this. The 'CopyBuffer' error - no one of the overloads can be applied to the function call.