I saw an example in
Regarding NT 6.5 :
Because of memory considerations I want to avoid creation of additional data series and I want to expose certain indicator value as a property.
My code is like:
Indicator A:
protected override void OnBarUpdate()
{
.............
state1 = [certain value]
..........
}
Read only property:
public int IPos
{
// read only - for external usage.
get { return state1 ; }
}
Indicator B (or strategy B )
val1 = IndicatorA(2,10).IPos ;
There are no compilation errors, but val1 is always 0 , despite the "state1" has different values for different bars.
I would expect that this statement will return current value of the property for every OnBarUpdate called.
I suspect my problem has something to do with a way my strategy calls OnBarUpdate().
What's wrong ?
Comment