Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

LinReg Lines - Price Type

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

    LinReg Lines - Price Type

    I'm looking to copy the linreg indicator so I can customize to a different basis (i.e. high, low, median, or typical). I see pricetypesupported in the base file but to customize it I didn't see the "close" basis or any other place to put "High" or "Low", etc.

    Any help anyone can offer is much appreciated.

    Thanks in advance for your help or pointing me to the correct file.

    Kirk

    #2
    Originally posted by zeller4 View Post
    I'm looking to copy the linreg indicator so I can customize to a different basis (i.e. high, low, median, or typical). I see pricetypesupported in the base file but to customize it I didn't see the "close" basis or any other place to put "High" or "Low", etc.

    Any help anyone can offer is much appreciated.

    Thanks in advance for your help or pointing me to the correct file.

    Kirk

    Hi Kirk,

    In the protected override void Initialize() section of your code, add the following line:

    PriceType = Data.PriceType.High;

    This will change the default the price type from "Close" to the pricetype of your choice.

    "High" in this example.

    Good Luck,

    RJay
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    Comment


      #3
      Hello Zeller4,

      Please include this line in your Initialize() code block:


      PriceTypeSupported = true;

      Then use Input[0] as you price. This link will help:
      http://www.ninjatrader-support.com/HelpGuideV6/Input.html



      Now you can choose between HLOC for your price in the user interface when attaching the indicator to the chart.
      DenNinjaTrader Customer Service

      Comment


        #4
        Thanks

        Thanks, rt6176 and Ben

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        173 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        328 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        252 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        354 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        181 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X