Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi time frequency system

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

    Multi time frequency system

    Hi,
    I developed a system on 30min bars and wanted to add some granularity on the execution using 5min bars.
    After reading the reference sample, I did the following:

    If (my conditions on the 30min bars I use for the back test)
    {
    if (BarsInProgress == 1)

    {
    /*
    A value of 0=primary bars, 1=secondary bars, 2=tertiary bars */
    EnterLong(1, 1, "Long from 5min");

    }


    }


    Running the back test with 30min and using BarsInProgress == 1 for the 5min time frame, results gets much worse.

    Could you please confirm is the code above is correct for what I want to do?

    Thank you

    #2
    Have you by chance review our reference sample on this?

    RayNinjaTrader Customer Service

    Comment


      #3
      I did now, thank you.
      The strategy won't work (in a different way though, now I get very few trades only in 1 year).
      Could you please help me?
      I'm using 30min as primary bars and 5min as secondary bars.
      Thank you.
      What I did is the following:

      if (My conditions

      {
      if (BarsInProgress == 0)

      {

      EnterLong(1, 1, "Long from 5min");

      }

      else
      {
      return;
      }

      }

      Comment


        #4
        Not sure what you mean by different way. If you use the "way" we specify in the reference sample, then it will work as expected.
        RayNinjaTrader Customer Service

        Comment


          #5
          Sorry Ray, I mean, the strategy I posted below compiles, but the results are wrong (I can see it watching the charts).
          I want my EnterLong to kick off if my conditions are satisfied on the 30min bars and I want to enter the trade in the first 5min bar after.
          Is that what I'm coding below?

          Thank you

          Comment


            #6
            You likely should filter for BarsInProgress first, then check for your trade condition.

            I highly suggest that you take the reference sampe we provide, copy it and make changes to reflect what you want. That way you start off with a working base of code.
            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            648 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            574 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X