I created an indicator that I am using in conjunction with auto-scaling to centre the price bars on my chart. I am however not able to put decimals in the two parameters that I have.
Here's the simple code I'm using.
protected override void OnBarUpdate()
{
Values[0][0] = Open[0] + HighOffset;
Values[1][0] = Open[0] - LowOffset;
}
#region Properties
[NinjaScriptProperty]
[Range(1, int.MaxValue)]
[Display(Name="HighOffset", Order=1, GroupName="Parameters")]
public int HighOffset
{ get; set; }
[NinjaScriptProperty]
[Range(1, int.MaxValue)]
[Display(Name="LowOffset", Order=2, GroupName="Parameters")]
public int LowOffset
{ get; set; }
Is there any way to allow decimals in the parameters so that I can use this indicator on markets with decimals in the price (eg. ES, NQ)?
Thank you in advance for your reply!

Comment