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 CarlTrading, 03-31-2026, 09:41 PM
                  1 response
                  155 views
                  1 like
                  Last Post NinjaTrader_ChelseaB  
                  Started by CarlTrading, 04-01-2026, 02:41 AM
                  0 responses
                  90 views
                  1 like
                  Last Post CarlTrading  
                  Started by CaptainJack, 03-31-2026, 11:44 PM
                  0 responses
                  137 views
                  2 likes
                  Last Post CaptainJack  
                  Started by CarlTrading, 03-30-2026, 11:51 AM
                  0 responses
                  130 views
                  1 like
                  Last Post CarlTrading  
                  Started by CarlTrading, 03-30-2026, 11:48 AM
                  0 responses
                  107 views
                  0 likes
                  Last Post CarlTrading  
                  Working...
                  X