Get Stochastic FullK Value of highest high


Category:
0
0

Hi,

Need help in thinkscript. I suppose ‘def hh = highest(high[10], 10)’, will give me the highest high of 10 bars starting from 10 bars back.

Now how to get the stochastic FullK value of this highest high. Thanks in advance.

RESOLVED
Marked as spam
Posted by (Questions: 6, Answers: 6)
Asked on August 14, 2018 2:09 am
109 views
0
Private answer

This has already been done, mostly: https://www.hahn-tech.com/ans/get-close-and-low-of-highest-high/

You may look at that solution and wonder how to tweak it so that is reports the Stochastic FullK at the highest high instead of the close and low. But it’s really the same exact thing.

First, just like algebra, we need to factor out the index value at the start and apply it at the end.

Did I loose you? Ok so in place of this:

plot hh = Highest(high[10], 10);

We do this:

def hh = Highest(high, 10);
plot highestHigh = hh[10];

This permits us to apply the solution from the previous post I linked at the start of this answer.

def fullK = StochasticFull().FullK;
def hh = Highest(high, 10);
plot highestHigh = hh[10];
def highestHighOffset = GetMaxValueOffset(high, 10);
def fullKAtHighestHigh = GetValue(fullK, highestHighOffset);
plot offsetFullK = fullKAtHighestHigh[10];

Notice, because we factored out the 10 bar shift from the beginning, this enables us to use GetMaxValueOffset(high, 10) in order to get the dynamic index value used to get the FullK value at the highest high in 10. We just need to make sure you apply the 10 bar shift at the end plot offsetFullK = fullKAtHighestHigh[10];

Marked as spam
Posted by (Questions: 37, Answers: 4090)
Answered on August 14, 2018 9:08 am
0

Thanks much appreciated.

( at September 11, 2018 10:54 am)