Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Simple strategy example with same backtest results in both sides, MT4 and TS
Could someone here please share a sample of a simple strategy example with the code for MT4 and TS, with the important part of getting the same backtest results in both platforms? And in that way to see what are the details that need to be considered in order to get the same strategy result (or very similar) in both platforms.
I’m trying to get the same result in TS from the simple MA strategy that comes as example with MT4, but the trades in the backtest are very different in both sides, and this of course using in both sides the same FX instrument, the same Time Frame, the same Range of dates, but while in MT4 is getting 50 trades, in TS is getting around 200 trades.
In TS, I tried to change the Time Zone to see if in that way it could get a result similar to MT4, but for now what I’m trying is not working to get a more similar result.
Please note that this is mainly for analysis purpose.
Can you help answer these questions from other members on NexusFi?
Here's my 2 cents 'cause I don't use either of the platforms on which you're testing the code. In general, from years of coding, my knee jerk is to direct you to the platform settings. An example of what I would look for is whether or not the platform allowed multiple entries in the same direction or not. Are both platforms allowing intrabar entries and exits. Are both platforms seeing the same level of detail -- e.g. ticks vs 1s granularity. Stuff like that.
You post sounds like you've already gone through a long list of possibilities so I'm likely preaching to the choir. But I figured it wouldn't hurt to mention some possibilities. I hope you find an answer.
BTW, it would not be out of the realm of reality to see a differences of a few trades if the two platforms are connecting to different data sources/brokers/exchanges or using SMART instead of a specific exchange. But the difference of more than 100 trades that you are seeing, (to state the obvious) has to be in either the code, the way the platform interprets the code, or the settings in the platform. I vote for the latter.