Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Line on different Timeframe

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

    Draw Line on different Timeframe

    Hy , I am very new at Ninja Trader programming. I have developed an indicator , that can draw for me the inportant high low levels, and trend line. Unfortunatelly , when I change the time frame , the indicator shows still the daily High Low lines .
    My question is what can be the problem?

    I have tried to write a void thet can handle the timeframe , but I am not sure about it can be the key of my problem.


    void period_changer()
    {
    if (BarsPeriod.Id == PeriodType.Minute){Add(PeriodType.Minute, 1);}
    if (BarsPeriod.Id == PeriodType.Day){Add(PeriodType.Day, 1);}
    }

    #2
    banyasz, welcome to our forums here - I'm sure not I follow what you feel is not working correctly, what would you expect to happen if you change the timeframe? What calculation should change?

    Dynamically adding a series would unfortunately not be supported, but you can add minute and daily and then refer to each BarsInProgress in your calcs as needed.

    Comment


      #3
      I just only want from the indicator , is when i change the timeframe from Daily to 1 minute, draw the High Low levels to the Minute timeframe. I attache two pictures , the good one is working on daily timeframe.
      And i wana to work the indicator on m1 TF. also.

      Comment


        #4
        Thanks, do you get any error shown in the log tab of the Control Center for the nonworking version?

        Comment


          #5
          Unfortunatelly there is no error message. I think when i chaneg timeframe , perhaps the indicator is still work on Daily chart.

          Comment


            #6
            banyasz, could you please email us at support at ninjatrader dot com with the script / code exported so we could give it a run here for you?

            Comment


              #7
              Thanks for the help I posted my script.

              Comment


                #8
                Originally posted by banyasz View Post
                Thanks for the help I posted my script.
                Thanks, did you sent it in to support? As I don't see it posted here in this thread (which is ok if you prefer to send it in directly to us).

                Comment


                  #9
                  I sent it to the support Thank you for the help!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  577 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  334 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  553 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  551 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X