I have a very simple indicator for which I want to 'force' the calculation mode to be Calculation.OnPriceChange. To achieve this, used [Browsable(false)] which works fine to hide the property on the indicators panel. But as soon as I hide it, the code weirdly stops working as intended. Somehow any default property that gets hidden goes back to it's default value, in the case of Calculation, it changes to the first const: Calculation.OnBarClose.
In the State.SetDefaults function Calculation.OnPriceChange is assigned, but when the Property is set to [Browsable(false)] the calculations are made OnBarClose, even though when Printing this.Calculation.ToString() "OnPriceChange" gets printed.
I have two copies of the indicator, one with, the other without the following piece of code:
[Browsable(false)]
public Calculate Calculate
{get; set; }
The one with those lines hides the Calculation property, but even when setting the calculation mode to OnPriceChange, the calculations are made OnBarClose.
Any idea on how this can be solved?
Any help is appreciated. The indicator is already working fine in every other aspect, but if this can be hidden and the results correct it would be nice.
Thanks!

Comment