Quote:
|
Originally Posted by 4xCoder
1. How do I know when a pending order becomes an open order (i.e. filled)?
Pending orders are OP_BUYLIMIT/OP_BUYSTOP, while an open order is OP_BUY. Same for sell orders
2. Is the only way to backtest by running the strategy tester? I was hoping to run a 6 month backtest - naturally this would take a long time using the Strategy Tester....I assume an alternative would be via code - hoping for any samples or advice on how to best do this.
When I start with a new stragtegy, I'll write an inidcator that displays entry and exit points on the chart, and prints the number of pips to the log. You can also color bars durning the trading similar to what Heiken-Ashi does. While not anywhere near as accurate as backtesting, it let's you eye-ball things and see if the strategy is worth presuing.
|
Thanks!
So, just so I understand - if I use OrderSend with OP_BUYLIMIT and it returns say 123 for my ticket number.
Are you saying that if/when my order gets picked up it will change that same order (ticket 123) to the type OP_BUY?
With regards to the backtesting....I don't mind "Printing' or otherwise outputting what the trades would have done.....but I guess using the close of bars is the only way to exit to get any kind of accuracy.
Also, would this be just a matter of looping from the start of the chart to the end of the chart? Would you normally add a parameter for "Backtest" where if it's true loop back and back test otherwise, it is treated as a "live" EA?
I guess the other option is to let the Strategy Tester run for a very long time?
Thanks again!