Hi Dragon,
As I read, for the market(and exchange) execution types the sl and tp variables are ignored,
therefore you should open your position and immediately after set the sl and tp with the specific action
request.action = TRADE_ACTION_SLTP;
Another thing is that you should set also the price variable, for the buy the ask price is to be setted and the order number(ticket) is useless for the market order.
Hope this helps ;)
DragonMQL:
What is the Stoplevels for the symbol you are using ?
can someone explain me by that Stop Loss and Take Profit do not work in the execution of the order?
what I have is the following:
DragonMQL:
I'm using EURUSD, the stop-loss minimum is 48, I in my test put it at 50.
I'm using EURUSD, the stop-loss minimum is 48, I in my test put it at 50.
- You have to check to returned value of OrderSend(), you also have to check the value of result.retcode. (You can also read the documentation in Spanish)
- Did you check what launic told you ? What execution mode are your broker using (Market/Exchange or Instant)?
- Do you have some error in the log ?
angevoyageur:
- Usted tiene que comprobar el valor devuelto de OrderSend (), también hay que comprobar el valor de result.retcode. (También puedes leer la documentación en español )
- ¿Has comprobado lo launic te dijo? ¿Qué modo de ejecución se utiliza su corredor ( Mercado / Exchange o instantánea )?
- ¿Tiene algún error en el registro?
OK, voy has trying to figure all that out and I call again.
Thanks for the help.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
what I have is the following: