View Full Version : LinReg Lines - Price Type
zeller4
10-05-2008, 09:00 PM
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
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
NinjaTrader_Ben
10-06-2008, 08:06 AM
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 (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.
zeller4
10-06-2008, 09:18 AM
Thanks, rt6176 and Ben