Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

FX backtesting

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

    FX backtesting

    I'm attempting to back test an FX strategy. I've set Type to "minute" and Value to "1440" in order to back test on "daily" prices... when I run the best test on this time frame NOTHING happens!

    #2
    d.allen101,

    Please ensure you have enough bars to cover 1440 minutes. Please then check your Control Center logs for errors.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      i have more than enough bars and no errors are the control center log. just to clarify...i'm getting my data from Gain Capital and they don't provide daily data so DataSeries parameters during back testing are, Type: Minute, Value: 1440 in order to generate daily bars. my code is simply if(Close[0]>High[1]) EnterLong();

      Comment


        #4
        Please add Print()s into your code and see what is/is not being processed.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          i can't figure out what's going wrong! it works just fine when using other values when back testing i.e. (300 min,120 min, 60 min ,etc...)

          Comment


            #6
            i have my session begin set at 12:00 AM and session end at 12:00 AM. is this correct if i have my dataSeries variables: type set to minute and value set to 1440?

            Comment


              #7
              This should be good - at which number of mins for the daily bars does it break then? Which min bars required setting are you working with? Are you working from the Strategy Analyer or charts?

              Comment


                #8
                I'm "BACKTESTING", the chart displays fine, it's just not executing the trades! To clarify, I"m receiving data from Gain Capital which doesn't provide daily data so when backtesting my strategy on a daily time frame I have to use Minutes for my type and 1440 for my value in the DataSeries within the BackTesting dialog box.

                Comment


                  #9
                  Are you having ExitOnClose set to 'true'? Then please retry with this set to 'false'.

                  Comment


                    #10
                    Here are my settings within the Backtest dialog:

                    Time series:
                    Type= Minute
                    Value= 1440

                    Time frame:
                    Session begins= 4:00 PM
                    Session ends = 4:00 PM

                    Within the NinjaTrader IDE I have ExitOnClose=false and the code I'm running is VERY simple: if(Close[0]>High[1]) EnterLong()

                    Comment


                      #11
                      Please recheck with those settings and the 'SampleMACrossOver' strategy, when I set ExitOnClose = false it works as expected on the 1440 min EURUSD chart from Gain / Forex.com - thanks.

                      Comment


                        #12
                        it's still not working. when i attempt to backTest the EURUSD with SimpleMACrossOver with settings of type: minute, value: 1440 and Exit on close: false it's still not executing any orders! the chart displays just fine but no trades! could it have something to do with my timeFrame: Session begins 4:00 PM and Session ends 4:00 PM?

                        Comment


                          #13
                          Please doubleclick on the chart to enter the properties, then click on 'Reset' to work with the default session begin and end times - does this change the behavior you get?

                          Comment


                            #14
                            i had forgot to change time in force back to GTC!!!!! it's working fine now, thx!

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                            0 responses
                            670 views
                            0 likes
                            Last Post Geovanny Suaza  
                            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                            0 responses
                            379 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by Mindset, 02-09-2026, 11:44 AM
                            0 responses
                            111 views
                            0 likes
                            Last Post Mindset
                            by Mindset
                             
                            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                            0 responses
                            575 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by RFrosty, 01-28-2026, 06:49 PM
                            0 responses
                            582 views
                            1 like
                            Last Post RFrosty
                            by RFrosty
                             
                            Working...
                            X