- Renko is my primary series(for my testing I am using brick size 10)
- My secondary series data is 1 tick data from a Dukascopy import
- I check for my entry signal on the Renko charts, and enter my trade using the overloaded verison of EnterLong()/EnterShort() that takes the BarsInProgressIndex parameter so I can execute my market order on the granular series, not the Renko.
- I wrote code for a manual trailing stop which is checked every tick, if the trade is stopped I use the overloaded ExitLong()/ExitShort() that takes the BarsInProgressIndex parameter so I can execute my exit order on the granular series, not the Renko.
- I use OnOrderUpdate() to track the order object and also pull information on the order to help track down the issue I am seeing
So the issue I am having is that I have a trailing stop loss of 1 pip, I currently have it set up to just constantly re-enter the market every time it gets stopped out, and the result I am getting is a profit factor of 6.5, and even up to 10 if I play with the settings. And that is after it takes over 100,000 trades! This result is obviously a total farce. I can write the same simple EA in other programs(MT4 and MT5 for example), and I will get a PF of 0.1. I understand this is using close only data, so it doesn't have the realism of bid/ask spreads(yes I know I can simulate that with more series, which I probably will doin the future, but for now I would like to see the close only data working correctly). Even with close only and no bid/ask spread I would still expect a strategy that just enters constantly with a 1 pip spread to perform very poorly, not achieve 6-10 PF on 100k trades.
I added some print statements to monitor prices as orders are being filled to see if there is any strange candle problems happening but it doesn't really look like it to me. Below I added the output from those Print statements for a single trade. #1 is the current Close[] when EnterLong() or EnterShort() is called(this is called from OnBarUpdate()). #2 and #3 are printed inside of OnOrderUpdate() when the actual entry order is filled. #2 are the Close[] prices again just to ensure the order is filled on the same tick that EnterLong/EnterShort was called, which it always is. #3 looks at 1 bar previous for both series data. #4 and #5 is the same as #2 and #3 but when the exit order is filled. Also as a side note this strategy can only open 1 order at a time, and is allowed to go long or short.
- Renko price at entry: 1.10881 - Tick price at entry: 1.10877
- tick_data_long - Renko price: 1.10881 - Tick price: 1.10877 - FillPrice: 1.10876
- tick_data_long - Renko Previous price: 1.10871 - Tick Previous price: 1.10877 - FillPrice: 1.10876
- tick_data_close_long - Renko price: 1.10881 - Tick price: 1.10881 - FillPrice: 1.10877
- tick_data_close_long - Renko Previous price: 1.10871 - Tick Previous price: 1.10883 - FillPrice: 1.10877
So overall I want to know why I am getting these fake, amazing results. The only explanation is something is not right with order execution and it is somehow scalping a little profit each trade due to something with the back testing engine. If that is the case then I would like to know what I am doing wrong and how to fix it. Obviously NT built an amazing back testing engine that works well, and I am just missing something. I also have a second side question, sometimes my fill price is 1 pip above or below the currect Close[] of the tick price at the time of order fill, and sometimes it is exactly the same. Why is that inconsistent(I would expect the fill price to be the same as Close[0] at time of order fill). Is it filling on the next tick that hasn't yet been loaded into Close[] when OnOrderUpdate()is called?
Thanks!

Comment