Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Forex

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

    Forex

    Someone could help on Forex strategies. I have a problem with the days to load of it. When I set the days to load at 120 then the strategy works fine in Forex market but if set it to 30 days the moment I enable it the the strategy with took many trades even the bar is not yet close. I set the it to run at bar close and I'm confuse with it. I don't have any problem with my other strategies for futures. Only with Forex that the days must be set to 120 days to load for it to run smoothly. Someone could help me with the case?

    #2
    luxurious_04, which broker or connection are you using for FX data / trading? Do you need tick or time based charts? What interval would be used? Are you running a single or MultiSeries strategy?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I am using MB Trading for Ninja Trader. I am using 60 minute time frame as the primary and 30 seconds the secondary and 15 minute. My signals are on BarsInProgress == 0 and BarInProgress == 1 and BarsInProgress == 2 are being return.

      Comment


        #4
        Thanks.

        What BarsRequired setting are you using for the script?

        This value would need to be satisfied on all series before you would see OnBarUpdate() being processed.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          BarsRequired are being set to 30.

          Comment


            #6
            Then I would not expect running with a 30 day look back to work for you. You need to factor in weekends as well, so I would go for at least 40/50 days then.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              So I will try BarsRequired = 50 then the days to load is 30? Is that it?

              Comment


                #8
                Bertran can you please tell me why does Forex needs a lot of days to load?

                Comment


                  #9
                  Originally posted by luxurious_04 View Post
                  So I will try BarsRequired = 50 then the days to load is 30? Is that it?
                  No, you want to have it the other way around. So there's ample data for all series to satisfy BarsRequired.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Okay I did it this way BarsRequired is 30 and days to load set 60 and it runs okay. Now, my question why does it requires to many days to load for example 60 and above?

                    Comment


                      #11
                      Sorry, don't follow you - please check through what we already had discussed. BarsRequired is set from the UI and has to be fulfilled for all series, as it would be not be trading days you set yo would need to have a higher # of days loaded than the actual bars required setting. So there's enough data to startup your scripts.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Sorry if I made you confused. I have attached an image of my strategy setup.
                        Attached Files

                        Comment


                          #13
                          What indicators do you use in the script? Do they need perhaps this long of a lookback to calculate meaningful values for signal creation?
                          BertrandNinjaTrader Customer Service

                          Comment


                            #14
                            I am using to EMAs with 6 and 12 and a bollinger with 14 period.

                            Comment


                              #15
                              Thanks. Then would at this point not have an explanation to point you to, would be best to simplify the code and debug to see where it would break and not behave as you would expect. For example if you're only running on the single, primary series - what behavior would you get? From where do you start it up, the strategy tab or chart?

                              Do you get a different behavior if you work only from a chart and load all series in manually and then attach the script to the primary series?
                              BertrandNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by elirion, Yesterday, 09:32 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post elirion
                              by elirion
                               
                              Started by cre8able, Yesterday, 09:15 PM
                              1 response
                              8 views
                              0 likes
                              Last Post bltdavid  
                              Started by cummish, Yesterday, 08:43 PM
                              0 responses
                              14 views
                              0 likes
                              Last Post cummish
                              by cummish
                               
                              Started by Option Whisperer, Yesterday, 07:58 PM
                              4 responses
                              21 views
                              0 likes
                              Last Post Option Whisperer  
                              Started by ETFVoyageur, 05-07-2024, 07:05 PM
                              13 responses
                              87 views
                              0 likes
                              Last Post ETFVoyageur  
                              Working...
                              X