Announcement

Collapse
No announcement yet.

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?

    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.

        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.

            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.

                  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.

                      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?

                          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?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              668 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              377 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              110 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
                              580 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X