How do you simulate trade execution only when market price passes thru your limit order rather than touching it?
Is there a way for me to work around this problem on demo account, and simulate trade execution only when the market price passes through the limit order only?
My first thought is that you could use virtual pending orders in your EA.
The EA programmatically tracks price vs. pending levels (that you set), and when the levels are reached, the EA places market orders.
My first thought is that you could use virtual pending orders in your EA.
The EA programmatically tracks price vs. pending levels (that you set), and when the levels are reached, the EA places market orders.
Yes I guess that is probably the only way to do it for now.
If MQL5 has a library for test tools to simulate limit orders virtually, it will be fantastic since this is a common problem.
Imagine everyone working on this problem has to develop the same source code repeatedly and reinventing the wheel.
I am searching the internet now for the source code, otherwise I have to code it myself.
Thanks.
If MQL5 has a library for test tools to simulate limit orders virtually, it will be fantastic since this is a common problem.
- www.mql5.com
What does TS stand for? --> I have posted in the discussion thread linking to the article. All questions will be sent there. Need your help if I have any questions.
Thanks I shall try it out tomorrow. This will be a great help if it works. I have burnt money just to run my limit orders in live environment...
- 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 guys,
This problem exists for the central exchange with futures.
I notice for a long time, on demo account, when the market price touches the limit order, it will immediately be triggered.
But on live account, the market price needs to pass through the limit order in order for it to be triggered seemingly all the time, ie. at least one tick below buy limit order.
Similarly for sell limit orders with one tick above it in order to be triggered.
Is there a way for me to work around this problem on demo account, and simulate trade execution only when the market price passes through the limit order only?
P.S. I actually hope the demo account can be customised for this mode of trade execution for the expert adviser from the programmer side.
Any advice is appreciated.
Thanks