Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Forex strategy testing

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

    Forex strategy testing

    Hi,
    I have a problem testing a simple MA crossing strategy or any other strategy that I write.
    When I try to backtest a strategy it returns "NaN" in the majority of the fields (Total Net profit, Gross profit, Gross loss, etc)
    I'm using Forex FXCM datafeed with NT8.

    Thanks.

    #2
    Welcome to the forums mcQQQ!

    NaN would mean "Not a Number." An infinite value or divide by zero may have been encountered to produce this value. I would consider looking into the Trades grid to see what trades were made to produce these values.

    Statistic definitions can be found here - https://ninjatrader.com/support/help...efinitions.htm

    When I test the SampleMACrossover strategy that comes with NinjaTrader, I get the following results:

    Click image for larger version  Name:	NinjaTrader_2020-09-13_15-30-05.png Views:	0 Size:	103.4 KB ID:	1118132

    Click image for larger version  Name:	NinjaTrader_2020-09-13_15-30-51.png Views:	0 Size:	187.1 KB ID:	1118133

    Could you confirm you are receiving similar results with this test strategy?

    If you have additional questions regarding the performance received, could you provide screenshots?

    To send a screenshot with Windows 7 or newer I would recommend using the Windows Snipping Tool.

    Click here for instructions

    Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

    Click here for detailed instruction

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi,
      this is what I get when I test SampleMACrossover.
      you can see also the trade it produce in the second screenshot.
      Thanks you.

      Comment


        #4
        Hello mcQQQ,

        I suspect that there are some region settings that are affecting the trade results so that values are being rounded close to 0 values, and then when the 0 values get used as a devisor for a another statistic, we end up with NaN values. It may also be possible that the data used is creating close-to-zero values that are then creating the NaN values.

        As we can see on my end, I do not have values that small., and I have valid number results.

        Could you let me know the following?

        Who is your data provider? Do you also see this behavior after removing your data in the Control Center's Tools > Historical Data window from the Edit tab and running a new backtest to fetch new data?

        What region settings have you set in Windows? From your PC clock, right click and select Adjust date/time. From here please take a screenshot of the Region window Please then select "Additional date, time & regional settings," and then "Change date, time or number formats." Please take a screenshot of this window, and then 2 final screenshots after clicking Additional settings (namely the Numbers and Currency tab.) I have attached screenshots form my end so it is clear what we are looking for.

        Please also let me know the TimeZone you have set in the platform under Tools > Options > General.

        We also will want to make sure you are on the latest version of the platform. Please update using the link below.

        Download - https://ninjatrader.com/PlatformDirect

        I look forward to assisting.
        Attached Files
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Stanfillirenfro, Today, 07:23 AM
        9 responses
        23 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by George21, Today, 10:07 AM
        0 responses
        5 views
        0 likes
        Last Post George21  
        Started by DayTradingDEMON, Today, 09:28 AM
        2 responses
        16 views
        0 likes
        Last Post DayTradingDEMON  
        Started by navyguy06, Today, 09:28 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        8 responses
        32 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X