1. Reason:
Use IndicatorID to locate the data of public persistent variables [Browsable(false)] that are stored in the workspace. Normally NT8 loads these public variables values from the workspace when NT8 is initiated. However, there are two situations that NT8 would not load the public variables from the workspace as follows:
a) When NT8 is initiated with no data connection, the data of the persistent public variables [Browsable(false)] are loaded correctly. After NT8 has completely loaded, initiating the data connection will cause the charts to reload but without the correct data for these persistent public variables.
b) After opening the chart UI input and changing any one of the public input variables, NT8 will reload the chart but without the correct data for these persistent public variables.
2. Properties
[NinjaScriptProperty]
[Display(Name="Input variable", Description = "Enter input variable", Order=1, GroupName="General Parameters")]
public double dValue_input
{ get; set; }
[NinjaScriptProperty]
[Browsable(false)]
public int ibar_persist
{ get; set;}
[NinjaScriptProperty]
[Browsable(false)]
public double dValue_persist
{ get; set;}
3. IndicatorID stored in the workspace file.
<IndicatorId>936</IndicatorId>
<MaxSerialized>0</MaxSerialized>
<MinSerialized>0</MinSerialized>
<ZOrder>10004</ZOrder>
<dValue_input>101</dValue_input>
<ibar_persist>300</ibar_persist>
<dValue_persist>951</dValue_persist>
4. Once the matching IndicatorId is located inside the workspace file, the public persistent variables [Browsable(false)] data can be retrieved. The question is how to retrieve the IndicatorID from within an indicator?
Comment