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

Wicks/tails on Linebreak charts

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

    Wicks/tails on Linebreak charts

    Hi everyone

    This question arises from thread 'Linebreak indicators' started by Labdog at:



    We've been helping each other out in this thread: Labdog's the Linebreak expert and I know a bit about coding.

    Labdog has asked a great question here:

    Linebreak bars show only a part of the actual price they reach. Could tails be added showing where the price really went for that bar? Could these lines be also formed on the live bar showing just like a time frame bar would leave tails as it forms?
    Please see Labdog's image attached.

    The only way I can think of doing this is to add a tick chart in a second panel, find the time of the open and close of the previous Linebreak bar and then find the max/min of the tick chart in this period. This would also be quite CPU intensive. (Obviously, the same logic would apply to Renko charts, etc.)

    This is really pushing at the limits of what I can do myself. Is there a way of avoiding loading an auxiliary tick chart? Is there a direct way of achieving this?.

    Any suggestions on how to achieve this will be much appreciated.
    Attached Files

    #2
    Originally posted by arbuthnot View Post
    Hi everyone

    This question arises from thread 'Linebreak indicators' started by Labdog at:



    We've been helping each other out in this thread: Labdog's the Linebreak expert and I know a bit about coding.

    Labdog has asked a great question here:



    Please see Labdog's image attached.

    The only way I can think of doing this is to add a tick chart in a second panel, find the time of the open and close of the previous Linebreak bar and then find the max/min of the tick chart in this period. This would also be quite CPU intensive. (Obviously, the same logic would apply to Renko charts, etc.)

    This is really pushing at the limits of what I can do myself. Is there a way of avoiding loading an auxiliary tick chart? Is there a direct way of achieving this?.

    Any suggestions on how to achieve this will be much appreciated.
    LineBreak is a kind of chart. Copy the class file and modify as necessary, much in the same manner as "UniRenko" and all the other shadow-showing "Renko" bar types were created by referencing the shipping Renko bar type.

    Comment


      #3
      Hello arbuthnot,

      Thank you for your post.

      Aside from adding in the tick series, you could create your own custom bar type but this requires unsupported code for NinjaScript.

      You can find the system bar types under (My) Documents\NinjaTrader 7\bin\Custom\Types and the file will be named @BarTypes.

      Comment


        #4
        Thanks very much, Koganam and Patrick. I had indeed looked in 'BarTypes' but it is simply beyond my competence to try to play around with this, all the more so as this requires unsupported code.

        If I could get the max/min of the tick chart for the period of the last bar, my approach would be to use the 'DrawLine' method to adjoin a line to each bar.

        From what you said, Patrick, the best (only?) approach would be to add a tick chart (which of course needn't be visible).

        I've looked in Help but I'm still not sure how to proceed.

        So any ideas as to how to get the time of the open and close of the previous bar using 'time' methods would be really appreciated.

        Thanks.

        Comment


          #5
          Originally posted by arbuthnot View Post
          Thanks very much, Koganam and Patrick. I had indeed looked in 'BarTypes' but it is simply beyond my competence to try to play around with this, all the more so as this requires unsupported code.

          If I could get the max/min of the tick chart for the period of the last bar, my approach would be to use the 'DrawLine' method to adjoin a line to each bar.

          From what you said, Patrick, the best (only?) approach would be to add a tick chart (which of course needn't be visible).

          I've looked in Help but I'm still not sure how to proceed.

          So any ideas as to how to get the time of the open and close of the previous bar using 'time' methods would be really appreciated.

          Thanks.
          Code:
          DateTime OpenOfPreviousBar = Time[2]; //equal to close of bar previous to previous bar
          DateTime CloseOfPreviousBar = Time[1];

          Comment


            #6
            Thanks, Koganam.

            I'll have a go at applying these time methods to a tick chart, which I think I may just be able to do myself. If I fail miserably (as usually happens), I'll be back...

            Much obliged.

            Comment


              #7
              Thank's for the interest in this everyone. This is way beyond my skill level, all the help is greatly appreciated.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by algospoke, Today, 06:40 PM
              0 responses
              10 views
              0 likes
              Last Post algospoke  
              Started by maybeimnotrader, Today, 05:46 PM
              0 responses
              7 views
              0 likes
              Last Post maybeimnotrader  
              Started by quantismo, Today, 05:13 PM
              0 responses
              7 views
              0 likes
              Last Post quantismo  
              Started by AttiM, 02-14-2024, 05:20 PM
              8 responses
              168 views
              0 likes
              Last Post jeronymite  
              Started by cre8able, Today, 04:22 PM
              0 responses
              10 views
              0 likes
              Last Post cre8able  
              Working...
              X