Print(_stoc1.PercentK[1]); not provide the correct value

Created at 05 Feb 2022, 08:52
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
AlgoCreators's avatar

AlgoCreators

Joined 16.01.2022

Print(_stoc1.PercentK[1]); not provide the correct value
05 Feb 2022, 08:52


hi

I want to access the past values of the stochastic, but these values are different from what the indicator shows

_stoc1 = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Exponential);

Print(_stoc1.PercentK[1]); 

------------------------------------------

output: 32/8461386529739

 


@AlgoCreators
Replies

AlgoCreators
05 Feb 2022, 09:06 ( Updated at: 21 Dec 2023, 09:22 )

RE:

meeting.chegini said:

hi

I want to access the past values of the stochastic, but these values are different from what the indicator shows

_stoc1 = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Exponential);

Print(_stoc1.PercentK[1]); 

------------------------------------------

output: 32/8461386529739

 

The problem was solved!!!!

Print(_stoc1.PercentK.Last(1)); 

That's right


@AlgoCreators