I want to control passive transactions such as triggering take profit, stop loss.
I know it can do that by setting up functions by myself.
But I wonder if MT5 has a direct way to control it.
I want to control passive transactions such as triggering take profit , stop loss.
I know it can do that by setting up functions by myself.
But I wonder if MT5 has a direct way to control it.
In MQL5, you can very easily distinguish between a deal that occurred as a result: Stop Loss or Take Profit. You can distinguish between "entry into the market" and "out of the market" deal and much more.
Trades need to be tracked in ' OnTradeTransaction '. Types of transactions that can be tracked: Deal Properties
Example:
Forum on trading, automated trading systems and testing trading strategies
Delete all pending orders for ALL SYMBOLS once one pending is Filled
Vladimir Karputov, 2022.03.08 17:09
Principle of operation
The EA tracks the entry of positions (if ' Catch 'IN' Deals ' is set to ' true ') or the closing of positions (if ' Catch 'OUT' Deals ' is set to ' true '). It does not matter what symbol and what Magic was the deal. As soon as the necessary deal is caught, all pending orders (for all symbols and for all Magic) will be deleted.
- www.mql5.com
In MQL5, you can very easily distinguish between a deal that occurred as a result: Stop Loss or Take Profit. You can distinguish between "entry into the market" and "out of the market" deal and much more.
Trades need to be tracked in ' OnTradeTransaction '. Types of transactions that can be tracked: Deal Properties
Example:
Thanks, I know trades can be tracked in ' OnTradeTransaction '.
I was wondering if we could pause it.
For example, I don't remove the stoploss in advance. If the price triggers my stoploss order, It would normally trigger a closed trade. But I hope it doesn't make stoploss trades.
Is there any code that can do this without removing the stop loss ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Is there any code in MQL5 to set global non-trading, even during strategy backtesting.
Including passive transactions such as triggering take profit, stop loss and pending orders.