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 now its compiling without errors but its not deleting the 2nd pending order after the first has been triggered.
Help please
Thanks
Does the ticket number of the market order match either ticketb or tickets? (as some Brokers server issue a new ticket number when the pending order is changed into a market order).
Hi again
The ticket number keeps the same when its triggered.
please try this when markets re-open, surround different data types with brackets when testing, i like your little program
Thanks
Adaheem, i would erase all code lines where "last_bar" is mentioned, as it will delay the deletion of the pending order (which has not been triggered); also after the release of major reports or important news there is sometimes after the first pending order has been triggered a rapid retracement of the market price. Do not forget to complete coding "sl" and "tp".
Hi now its compiling without errors but its not deleting the 2nd pending order after the first has been triggered.
Help please
Thanks
The corrected code dated 2010.10.03 01:00 works: it places a Buy stop pending order above the market and a Sell stop pending order below the market, then the price goes down (for real example) and when the price reaches the Sell stop pending order it becomes a Sell market order and the Buy stop order is deleted.
I reminded you "Do not forget to complete coding sl and tp" as your expert will not close the market order, you need to remove the expert and close the market order manually. You need to add code that only allows for one market order or only placing the pending orders once.