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 cmoran13, Yesterday, 01:02 PM
            0 responses
            30 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            22 views
            0 likes
            Last Post PaulMohn  
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            160 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            95 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            148 views
            2 likes
            Last Post CaptainJack  
            Working...
            X