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

Multi Time Frame TriggerLine Indicator

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

    Multi Time Frame TriggerLine Indicator

    I'm trying to develop a Multi Time Frame TriggerLine indicator. Refer to the attachments.

    Showing is a 5 tick NexGen Renko bar. As shown in the attachment, the channels above and below are the 8 tick bar channels.

    What I'm having problems with are the TriggerLines. Currently they are showing the 5 tick bar calculations. I read the indexing discussion on higher time frame bars, but when I try to apply that indexing, I get an error.

    Can anyone show me how to apply the higher time frame 8 tick bars as an input to the LinearRegression plots?

    regards,
    taddypole...
    Attached Files

    #2
    Hello Taddypole,

    Thank you for writing in.

    You will need to use Closes if you are trying to refer to another series' close value.

    Code:
    Closes[1][0]
    For more information about Closes, please take a look at the help guide at this link: https://ninjatrader.com/support/help...t7/?closes.htm
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      I think I found my answer.
      I need to use the "BarsArray[1]" as an input to my indicator. Since the indicator needs the closing price, does BarsArry1 provide the close to the indicator input?

      i.e. -

      LargeLinRegCurve.Set(LinReg(BarsArray[1],lrgLength)[0]);

      regards,
      taddypole...

      Comment


        #4
        Hello Taddypole,

        For use as an indicator input, yes, you will want to use BarsArray[1].

        Indicators accept DataSeries as an input, not a double value.

        Please, let us know if we may be of further assistance.
        Last edited by NinjaTrader_ZacharyG; 04-09-2016, 09:38 AM.
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Thanks Zachary,

          Does BarsArray[1] then provide the Closing price which is what I desire?

          regards,
          taddypole...

          Comment


            #6
            Hello Taddypole,

            I am not clear.

            You cannot pass a single close price to the input parameter of an indicator method. This parameter accepts an IDataSeries, which is what BarsArray[1] is.

            If you just want to set the close price of your secondary series to your LargeLinRegCurve DataSeries, you will need to use the syntax I have provided in my initial reply.

            Example:

            Code:
            LargeLinRegCurve.Set(Closes[1][0]);
            Originally posted by NinjaTrader_ZacharyG View Post
            Hello Taddypole,

            Thank you for writing in.

            You will need to use Closes if you are trying to refer to another series' close value.

            Code:
            Closes[1][0]
            For more information about Closes, please take a look at the help guide at this link: https://ninjatrader.com/support/help...t7/?closes.htm
            If you are wanting to set your LargeLinRegCurve DataSeries to the current LinReg value based on your secondary series as its input series, you'll want to do the following below:

            Code:
            LargeLinRegCurve.Set(LinReg(BarsArray[1], lrgLength)[0]);
            Last edited by NinjaTrader_ZacharyG; 04-09-2016, 09:53 AM.
            Zachary G.NinjaTrader Customer Service

            Comment


              #7
              Thank you Zachary,

              That helps...

              regards,
              taddypole...

              Comment


                #8
                I’m making progress on plotting trigger lines on higher time frame bars using UniRenko type bars but its still not working.

                I’m using “Add(PeriodType.Custom5,002015009) which creates a HTF bar of trend size of 2, a reversal bar of 15 and a brick size of 9.

                Then when in BarsInProgress == 1, I try to calculate the “LargeLinRegCurve” but I’m not getting good results. See attached chart picture.

                Can someone tell me what I’m doing wrong?

                regards,
                taddpole…
                Attached Files

                Comment


                  #9
                  Never mind....

                  Figured it out.. !!!!


                  regards,
                  taddypole...
                  Attached Files

                  Comment


                    #10
                    Taddypole - Are you willing to share your code?
                    Last edited by aprilfool; 11-14-2020, 06:24 PM.

                    Comment


                      #11
                      Hello aprilfool,

                      I see your inquiry is directed at Taddypole.

                      I just want to say welcome to the NinjaTrader forums!
                      Chelsea B.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by sidlercom80, 10-28-2023, 08:49 AM
                      167 responses
                      2,260 views
                      0 likes
                      Last Post jeronymite  
                      Started by warreng86, 11-10-2020, 02:04 PM
                      7 responses
                      1,362 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by Perr0Grande, Today, 08:16 PM
                      0 responses
                      5 views
                      0 likes
                      Last Post Perr0Grande  
                      Started by elderan, Today, 08:03 PM
                      0 responses
                      9 views
                      0 likes
                      Last Post elderan
                      by elderan
                       
                      Started by algospoke, Today, 06:40 PM
                      0 responses
                      10 views
                      0 likes
                      Last Post algospoke  
                      Working...
                      X