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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        43 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        29 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        46 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Working...
        X