Access on numbers of Indicators.StochasticOscillator
Created at 08 Nov 2017, 00:11
Access on numbers of Indicators.StochasticOscillator
08 Nov 2017, 00:11
Hello,
I would like make some operation on Indicators.StochasticOscillator put i cant have access on the number a.PercentK
protected override void OnTick()
{
var a = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);
if ( a.PercentK <= 80)
{
// close position
}
}
Thanks for your help
PanagiotisCharalampous
08 Nov 2017, 10:20
Hi mto1995,
PercentK is a DataSeries so it is not a single value but a collection. So you need to define which value you want to access. See below an example on how to get the last value of the DataSeries
Best Regards,
Panagiotis
@PanagiotisCharalampous