Similar topics:
Forums › ProRealTime English forum › ProOrder support › 50 Pips A Day Forex
Hmm…so I copied this code into ProBacktest. First it says that the variable x is not defined (there is an x in line 5). I simply removed this line (maybe it’s not even supposed to be there??). Anyway after I try to run the backtest I get an error, please see the attached picture.
Sorry I was optimizing the strategy and testing what difference various settings for shortcandle made (not a lot) and forgot to delete the /x when I posted the code. I have edited my last post and so if you now cut and paste the code it should work.
You must run the strategy on a 1 second chart. If not then that is the reason for the error message that you posted the image of.
Great Vonasi! Thank you so much and I’m happy you got something out of this too.
I just had a question out of pure interest. How come you chose the second timeframe to be 1 second and lets say not 1 minute instead? Was it because high volatility would maybe then go both short and long during 1 minute?
The reason I am asking is because, even though I am sure the system will work live, there is not really a way to back test it like this right? A 1 second chart will show too little data to effectively backtest it right?
Yes I chose 1 second because that way as soon as a trade is opened the other order is cancelled as soon as possible. Yes you could stretch it out to other time frames but the slower the time frame the more risk that trades in both directions could be opened.
This is one of the current limitations of MTF codes – very little backtest data on fast time frames. I believe v11 will be better in this regard. To be honest most back tests are not very accurate as we have to use a fixed spread and in real life spread is not fixed and has not been exactly the same spread since the year dot.
The 1 hour version that I wrote does a pretty good job of simulating how the strategy would perform in a back test but live forward testing is always preferable to back testing. To do this just run the strategy live in your demo account on a 1 second time frame by clicking the ‘Automatic Trading’ tab in the programming window.
Find exclusive trading pro-tools on