OrderSend (_Symbol,OP_SELLSTOP,0.05,Bid-100*_Point,3,NULL,NULL,NULL,778,0,Red);
Please use Bid price for sell orders.
To create another buy stop order you need to wait for the previous order to be executed. For that you can use trade transaction event.
MQL5 Cookbook: Processing of the TradeTransaction Event
- www.mql5.com
This article considers capabilities of the MQL5 language from the point of view of the event-driven programming. The greatest advantage of this approach is that the program can receive information about phased implementation of a trade operation. The article also contains an example of receiving and processing information about ongoing trade operation using the TradeTransaction event handler. In my opinion, such an approach can be used for copying deals from one terminal to another.
Sorry for the wrong link. Mql4 does not support that. You have to check orders and positions yourself.
You can also check this link: https://www.mql5.com/en/forum/414851
Yashar Seyyedin #:
Sry for the wrong link. Mql4 does not support that. You have to check orders and positions yourself.
Sry for the wrong link. Mql4 does not support that. You have to check orders and positions yourself.
You can also check this link: https://www.mql5.com/en/forum/414851
Hi
Maby OrderSelect the last open order, check if it is buy/sell or buy stop/sell stop position and then open a buy or sell stop from that last order open price
but I need someone to assist with the code
Regards
This is an international English forum; post in English on this part of the forums. "Sry" is not a word, "Maby" is not a word.
Please don't write ur - it's "you are" or "your" - MQL4 programming forum (2014)
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
Sorry for this question maybe it's an easy one
I use the OrderSend function to open a sell stop X distance from price
OrderSend (_Symbol,OP_SELLSTOP,0.05,Ask-100*_Point,3,NULL,NULL,NULL,778,0,Red);
Now I want to open a Buy Stop but only when the above Sell Stop is triggered and X points from sell stop
Thanks in advance