Thank you. Just what I need. Made a script and... ...measured it. TERMINAL_MEMORY_TOTAL and TERMINAL_MEMORY_AVAILABLE error in the documentation, never understood what they give out and in what measurements, but it seems not what is intended.
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?
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?
tol64: 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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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.