Download MetaTrader 5

completely automated stop loss

To add comments, please log in or register
dawntrades
10
dawntrades  
I have been running an EA on paper trade-soemtimes, the order gets filled, but the stop loss does not,(automated NOT manual).  I have read it is a problem, and wondering if anyone has founda  script or a solution to avoid a completely automated trade (entered into and exited all by the EA) from not getting a stop loss set and losing the whole trade.  Suggestions?
Dr.Trader
3810
Dr.Trader  
<p>I think that ECN brokers do not allow to set stop at the time when placing order. Expert advisor developers usually add another check after new order, and reset stop loss if it was ignored when placing order.</p><p>Also, you can search for "stop loss" or "virtual stop loss" expert in the market and use it to automatically set stoplosses. Just put this ea on different chart window.<br></p>
Jose Miguel Soriano
4984
Jose Miguel Soriano  
dawntrades:
I have been running an EA on paper trade-soemtimes, the order gets filled, but the stop loss does not,(automated NOT manual).  I have read it is a problem, and wondering if anyone has founda  script or a solution to avoid a completely automated trade (entered into and exited all by the EA) from not getting a stop loss set and losing the whole trade.  Suggestions?

You should studying the subject SYMBOL_TRADE_EXEMODE. If the broker executes order in (mode==SYMBOL_TRADE_EXECUTION_MARKET || mode==SYMBOL_TRADE_EXECUTION_EXCHANGE) you must give a second modification command informing SL and TP

If executes the orders in (modo==SYMBOL_TRADE_EXECUTION_REQUEST || modo==SYMBOL_TRADE_EXECUTION_INSTANT) isn´t necessary 

Alain Verleyen
Moderator
31183
Alain Verleyen  
Dr.Trader:
<p>I think that ECN brokers do not allow to set stop at the time when placing order. Expert advisor developers usually add another check after new order, and reset stop loss if it was ignored when placing order.</p><p>Also, you can search for "stop loss" or "virtual stop loss" expert in the market and use it to automatically set stoplosses. Just put this ea on different chart window.<br></p>
josemiguel1812:

You should studying the subject SYMBOL_TRADE_EXEMODE. If the broker executes order in (mode==SYMBOL_TRADE_EXECUTION_MARKET || mode==SYMBOL_TRADE_EXECUTION_EXCHANGE) you must give a second modification command informing SL and TP

If executes the orders in (modo==SYMBOL_TRADE_EXECUTION_REQUEST || modo==SYMBOL_TRADE_EXECUTION_INSTANT) isn´t necessary 

This is not true, you can always set a SL/TP with any type of order and execution mode.
Alain Verleyen
Moderator
31183
Alain Verleyen  
dawntrades:
I have been running an EA on paper trade-soemtimes, the order gets filled, but the stop loss does not,(automated NOT manual).  I have read it is a problem, and wondering if anyone has founda  script or a solution to avoid a completely automated trade (entered into and exited all by the EA) from not getting a stop loss set and losing the whole trade.  Suggestions?
Show your code.
To add comments, please log in or register