Hi - Thanks for earlier advice. Very helpful and I managed to get the EA working (pls see above).
I'm now attempting to modify so that uses limit orders rather than market orders. Am struggling.
Struggling in what way ? from a point of view of syntax your code looks OK to me.
For your BUYLIMIT to work frac_buy would have to be below the Ask price when you place the order. Then you have to consider what you will do if price doesn't fall sufficiently to pick up the order ? will you leave it in place indefinitely (you have set Expiration to 0) or will you close it if, for example, the TP level is passed (although you don't have a TP level set) ?
Struggling in what way ? from a point of view of syntax your code looks OK to me.
For your BUYLIMIT to work frac_buy would have to be below the Ask price when you place the order. Then you have to consider what you will do if price doesn't fall sufficiently to pick up the order ? will you leave it in place indefinitely (you have set Expiration to 0) or will you close it if, for example, the TP level is passed (although you don't have a TP level set) ?
Hi Raptor - Thanks for that. I've now read up on the expiration issue (was all new to me!) and inserted a 3600 expiration as am using hourly data. The limit orders should only be open for the duration of the current bar.
Unfortunately still no trades being executed in the back test period, since I changed the order from market to limit (works perfectly when market orders). I take your other point that the limit orders need to be either above or below the current Bid/Ask in order to be valid, and that is the case.
Thanks again for input.
Fracmap
- 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 - Thanks for earlier advice. Very helpful and I managed to get the EA working (pls see above).
I'm now attempting to modify so that uses limit orders rather than market orders. Am struggling.
Is there perhaps a simplere way to achieve this?
The changes I have made to try and make work as limit orders are as follows - advice appreciated as always. Tks Fracmap.