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.
    BertrandNinjaTrader Customer Service

    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?
        BertrandNinjaTrader Customer Service

        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?
            BertrandNinjaTrader Customer Service

            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).
                BertrandNinjaTrader Customer Service

                Comment


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

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by wftrrdt, Today, 05:01 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post wftrrdt
                  by wftrrdt
                   
                  Started by wellbeingcbd, Today, 04:41 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post wellbeingcbd  
                  Started by piydasuknu, Today, 03:45 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post piydasuknu  
                  Started by ajdfkgjiojjhfihjg, Today, 03:20 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post ajdfkgjiojjhfihjg  
                  Started by keravitahere, Today, 01:56 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post keravitahere  
                  Working...
                  X