Download MetaTrader 5
To add comments, please log in or register
Documentation is available in CHM and PDF. Download it in any convenient form!
dawntrades
10
dawntrades 2015.04.16 01:16 
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
3753
Dr.Trader 2015.04.16 01:40  
<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
4941
Jose Miguel Soriano 2015.04.17 19:43  
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
30299
Alain Verleyen 2015.04.17 22:39  
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
30299
Alain Verleyen 2015.04.17 22:40  
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