NexusFi: Find Your Edge


Home Menu

 





Simple strategy example with same backtest results in both sides, MT4 and TS


Discussion in EasyLanguage Programming

Updated
    1. trending_up 798 views
    2. thumb_up 2 thanks given
    3. group 4 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Simple strategy example with same backtest results in both sides, MT4 and TS

  #1 (permalink)
futurenow
Earth planet
 
Posts: 53 since Feb 2017
Thanks Given: 42
Thanks Received: 13

Hello everyone,

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.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
What broker to use for trading palladium futures
Commodities
 
  #2 (permalink)
abev
seattle washington
 
Posts: 75 since Feb 2019
Thanks Given: 11
Thanks Received: 29

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.

Reply With Quote
Thanked by:
  #3 (permalink)
timfel
London, UK
 
Posts: 19 since Mar 2023
Thanks Given: 5
Thanks Received: 1



futurenow View Post
Hello everyone,

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.

It's probably different data from TradeStation vs your broker — than can give very different results depending on your strategy.

Reply With Quote
Thanked by:




Last Updated on June 12, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts