sergey966121: Hello. i have no tabs in the tools window of MT5: calendar, signals, can you tell me how to add them?
The settings on the trading server are responsible for the "Calendar" tab. If there is no tab, request its inclusion from the merchant where the trading account is opened.
I wonder if it is possible to use MQL5 to trace the event - TP triggered? Or is it necessary to check the position status?
Of course you do, the position will inform you about the event - it is just an entity (a record in the database + something else) on the brokerage company's server.
I have not dealt with it yet due to impracticality, but won't OnTrade and OnTradeTransaction events trace position closing by take?
Trade
The Tradeevent is generated when a trade operation on the trade server is completed. The Trade event is handled by OnTrade() function for the following trade operations
setting, modification or deletion of a pending order;
cancelling a pending order in case of insufficient funds or upon expiry;
triggering of a pending order;
opening, adding or closing of a position (or a part of a position);
modification of an open position (change in stops).
TradeTransaction
As a result of certain actions performed on a trade account its state changes. Such actions include:
Sending a trade request by any MQL5 application in the client terminal using OrderSend and OrderSendAsync functions and its further execution;
Sending a trade request via the terminal graphical interface and its further execution;
Triggering of pending and stop orders on the server;
Execution of operations on the trade server side.
As a result of these actions, trade transactions are performed for the account:
processing of a trade request;
modification of open orders;
Changing the order history;
Changing the history of deals;
Changing positions.
For example, when a market buy order is sent, it is processed, an appropriate buy order is created for the account, the order is executed, removed from the list of open orders, added to the order history, then the corresponding deal is added to the history and a new position is created. All these actions are trade transactions. The arrival of each such transaction in the terminal is the TradeTransaction event. This event is handled by OnTradeTransaction function.
I have no tabs in the tools window of MT-5 - calendar, signals, could you tell me how to add them?
Hello.
i have no tabs in the tools window of MT5: calendar, signals, can you tell me how to add them?
The settings on the trading server are responsible for the "Calendar" tab. If there is no tab, request its inclusion from the merchant where the trading account is opened.
If there is no "Signals" tab:
If there is no "Signals" tab in MetaTrader
Added: Is it Windows operating system?
Hello!
I can get the TP and SL values of a position usingPositionGet...(), but how can I set the takeprofit of the whole position?
I can't specify it. Thank you!
Hello!
I can get the TP and SL values of a position usingPositionGet...(), but how can I set the takeprofit of the whole position?
Thank you!
Like this, using the standard library and CTrade class:
There you go, using the standard library and CTrade class:
Thank you!
Thank you!
Here is an example of a script (PositionModify(SL).mq5) - it first opens a position, and then changes the stop loss of this position:
Restriction on use: it will only work correctly on netting accounts.
I managed to set TP for the position, thank you.
I wonder if it is possible to use MQL5 to trace the event - TP triggered? Or is it necessary to check the position status?
I managed to set TP for the position, thank you.
I wonder if it is possible to use MQL5 to trace the event - TP triggered? Or is it necessary to check the position status?
I have not dealt with it yet due to impracticality, but won't OnTrade and OnTradeTransaction events trace position closing by take?
Trade
The Tradeevent is generated when a trade operation on the trade server is completed. The Trade event is handled by OnTrade() function for the following trade operations
TradeTransaction
As a result of certain actions performed on a trade account its state changes. Such actions include:
As a result of these actions, trade transactions are performed for the account:
For example, when a market buy order is sent, it is processed, an appropriate buy order is created for the account, the order is executed, removed from the list of open orders, added to the order history, then the corresponding deal is added to the history and a new position is created. All these actions are trade transactions. The arrival of each such transaction in the terminal is the TradeTransaction event. This event is handled by OnTradeTransaction function.