Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 maybeimnotrader, Yesterday, 05:46 PM
                  4 responses
                  23 views
                  0 likes
                  Last Post maybeimnotrader  
                  Started by frankthearm, Today, 09:08 AM
                  6 responses
                  25 views
                  0 likes
                  Last Post frankthearm  
                  Started by adeelshahzad, Today, 03:54 AM
                  5 responses
                  33 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by stafe, 04-15-2024, 08:34 PM
                  7 responses
                  32 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by merzo, 06-25-2023, 02:19 AM
                  10 responses
                  824 views
                  1 like
                  Last Post NinjaTrader_ChristopherJ  
                  Working...
                  X