Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Forward run Sim101, then Strategy Analyser - both same dataset, but different results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Hello,

    I have attached an image of what is happening.

    Based on the data you have sent and running the strategy I have confirmed it is the spread you are seeing here.

    The backtest will only be using the bid values where the live trade will be using ask and bid value so there is not really a comparison between a backtest and live data in this case.

    You can try to accommodate this to make more real results by accounting for your spread by using your average spread and applying a commission to this specific instrument.

    This would only be helpful for the PnL though you shouldn't expect that the executions will match between live and historical in this sense.

    If you would like to set up commission for a single instrument you can do that using the instrument manager. You would need to locate the instrument in the master list and select and press edit. Once you are in the instruments properties you can adjust the commissions in the Misc tab.

    Please let me know if I may be of additional assistance.
    Attached Files
    JesseNinjaTrader Customer Service

    Comment


      #17
      Jesse

      Thank you for your helpful reply. However, I'm not certain you've addressed the whole issue.

      If you look again at my posting of 12-25-2014, 12:00 AM, in reply to koganam, you'll see two ten minute charts, one from the Sim101 account, the other on the same data from Strategy Analyser - the data used by the analyser was gathered by NinjaTrader working on the Sim101 account, with the "Options / Data / Save chart data as historical" option checked.

      Even a fairly cursory glance shows that the candles do not match. Indeed I alluded to this in my reply to yours of the day before yesterday (12-29-2014, 09:14 PM), when I said,
      Originally posted by James Beale View Post
      Even the chart data isn't the same, despite the "Save chart data as historical" being checked. Perhaps this is the nub of the problem?
      This seems totally inexplicable, given that the dataset is supposed to be the same. I hope you can explain!

      Comment


        #18
        Originally posted by James Beale View Post
        Jesse

        Thank you for your helpful reply. However, I'm not certain you've addressed the whole issue.

        If you look again at my posting of 12-25-2014, 12:00 AM, in reply to koganam, you'll see two ten minute charts, one from the Sim101 account, the other on the same data from Strategy Analyser - the data used by the analyser was gathered by NinjaTrader working on the Sim101 account, with the "Options / Data / Save chart data as historical" option checked.

        Even a fairly cursory glance shows that the candles do not match. Indeed I alluded to this in my reply to yours of the day before yesterday (12-29-2014, 09:14 PM), when I said,

        This seems totally inexplicable, given that the dataset is supposed to be the same. I hope you can explain!
        FXCM has several dealing rates for real-time data, and your account may not match the rates that are used for either the FXCM native historical data servers, or the NinjaTrader historical data servers which are used by default.

        Even though you have "save chart data as historical" checked, there are times that NinjaTrader will reload your data automatically as you have 'get data from server' checked as well as pointed out from your screenshot in post #11. You can disable the 'get data' option which will prevent NinjaTrader from reloading data when you restart/connect - however you will still be able to right click on the chart and select 'reload all historical data' if you need to make a data request for missing data.

        As koganam pointed out, if you feel there is a problem when the strategy base which is causing issues, you should run the strategy on a centralized market which we can help ensure that your real-time data vs historical matches are there is one centralized feed to report data from.

        With Forex however, we have a different story. There is no way for anyone to gurantee that your real-time vs historical data will match due to the decentralized nature of forex, and even data from the same provider is susceptible to mismatches depending on the spread rate for that account vs the spread rate used for historical data.

        If you want your real-time vs historical data to match for forex, there are several factors to consider. Since you are 'saving chart data as historical', you can try unchecking 'get data from server' or completely disabling the historical data from the Account Connection options to prevent server data from overwriting your real-time data.

        However doing so will force you to run NinjaTrader 24/7 and act as your own data server used to record chart data, which is just not a reality for many people as computers may need to be restarted or shut down turning trading hours.

        If you need to rely on historical data to be recorded from a 3rd party, you will need to ensure you have the same exact dealing rate as the historical data provider being used.

        When you setup your account with FXCM you would have selected either an:
        • Agency model feed
        • Dealing desk model feed


        In the Agency model, there are two feeds
        • Retail
        • Active Trader


        Based on our research, the following configuration should be considered based on your account type:
        • Agency retail client --> Use NinjaTrader Servers
        • Agency active trader client --> Use NinjaTrader Servers
        • Dealing desk client --> "Use FXCM servers" will be most accurate (discrepancies will still occur)


        Doing so will help reduce the number of discrepancies you receive, but there is no guarantee as the API is polled at random intervals, meaning two traders sitting right next to each other on the same API can receive slight discrepancies between data.

        The last thing to note, is I did notice from your screenshot earlier that you have your quotes set to 'Full pip' however FXCM sends data in tenth-pip. This can contribute to rounding issues when comparing to real-time to historical data. To ensure your real-time vs historical data is more precise, please make sure to configure your data option Quote currencies (FX) to "Tenth pip".

        To summarize, this is the nature of forex and this information should only help you reduce discrepancies, it should be understood that you cannot prevent it. If you're looking for a silver bullet and would rather not be distracted by analyzing market data and would like to focus on strategy development for educational purpose, use your strategy on a centralized market. However we'll be happy to work with you to reduce discrepancies to the best of our abilities.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by mattbsea, Today, 05:44 PM
        0 responses
        4 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        31 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        2 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,282 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        20 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Working...
        X