Hi!
Is it ok to place two stop orders (buy and sell) at the same time,I mean will the broker allow me?(with the help of an ea ofcrse)
For example 1 above the high and 1 below the low of "candle[1]" once its closes?
Yes, I don't see any reason why not, if you are USA based using a Broker that does not allow hedging then there will probably be issues if both orders are activated . . . you need to ensure that the Orders are far away from current price, you should code this checks to avoid errors, it is much more preferable than handling the errors after they occur, this will help: Requirements and Limitations in Making Trades
Thanks a lot man, I see now.
Hi!
I've reviewed again the limitation of placing orders and still cant figure out why the SL and TP are not being placed...the orders themselves are placed but not the Sls and TPs.
I've thought its the problem with the StopLevel but the stop orders(buy/sell) are being placed...
Please, I really need you to point me in the right direction..here is the code thanks.
int ssl= High[1]+((10*xecn)*Point); int stp= OrderOpenPrice()-(Range*3); OrderSend(Symbol(),OP_SELLSTOP,LotSize,Low[1]-((10*xecn)*Point),3,ssl,stp,NULL,MagicNumber,0,Red); int bsl= Low[1]-((10*xecn)*Point); int btp= OrderOpenPrice()+(Range*3); OrderSend(Symbol(),OP_BUYSTOP,LotSize,High[1]+((10*xecn)*Point),3,bsl,btp,NULL,MagicNumber,0,Green); Range var is: Range = ((High[1]-Low[1])+(20*xecn)*Point); xecn is either 1 or 10 (adjustment to chart)
Hi!
I've reviewed again the limitation of placing orders and still cant figure out why the SL and TP are not being placed...the orders themselves are placed but not the Sls and TPs.
I've thought its the problem with the StopLevel but the stop orders(buy/sell) are being placed...
Please, I really need you to point me in the right direction..here is the code thanks.
Why aren't you checking the OrderSend() return value to check if it worked or failed ? then if it failed you can print the error and any associated useful variables, e.g. Bid, Ask, Open price, Lotsize, SL, TP, etc.
Read this and implement it: What are Function return values ? How do I use them ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi!
Is it ok to place two stop orders (buy and sell) at the same time,I mean will the broker allow me?(with the help of an ea ofcrse)
For example 1 above the high and 1 below the low of "candle[1]" once its closes?
Thanks