No need to proceed yet, as your orders above will not be executed, probably with an error like "invalid stops".
Sorry I don't understand, what's the problem with the stop loss level?
StopLoss and TakeProfit must be a price, not a number of pips, in the command.
if(Long)
{
ticket_1=OrderSend(Symbol(),OP_BUY,Lots,Ask,NULL,Bid-StopLoss*Point,Ask+TakeProfit*Point,"UP",0,0,Green);
ticket_2=OrderSend(Symbol(),OP_BUY,Lots,Ask,NULL,Bid-StopLoss*Point,Ask+TakeProfit*Point,"UP",0,0,Green);
}
Ops, sorry. Now it works.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hi, I have this statement to place 2 orders
if(Long)
{
ticket_1=OrderSend(Symbol(),OP_BUY,Lots,Ask,NULL,15,15,"UP",0,0,Green);
ticket_2=OrderSend(Symbol(),OP_BUY,Lots,Ask,NULL,15,30,"UP",0,0,Green);
}
I need to move my trailing stop on the second order(ticket_2) only when the first order reach its 15 pips target, and the second order remains alone on the market.
How can I proceed?
Thank you!