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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        579 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X