@sumihiko Since I did not hear back from you, I took a stab at what I thought might be a logical sequence of events that makes sense. The moment the Stochastic FullK crosses ABOVE the FullD, plot a horizontal line at the current price UNTIL the FullK goes BELOW the FullD.

Here is the study that does just that. It has all the components we discussed earlier - capturing the bar number and projecting forward until the condition no longer holds true. When you load this study, also load the TOS Stochastic Full study so you can match the cross points as well.

This should bring you closer to the study you seek

Code:

```
# Stochastic FullK/FullD Cross Horizontal Line
# tomsk
# 1.3.2020
def bar = barNumber();
def StoCrossBar = if StochasticFull()."FullK" crosses above StochasticFull()."FullD"
then bar
else StoCrossBar[1];
def crossPrice = if bar == HighestAll(stoCrossBar)
then low
else crossPrice[1];
plot hLine = if barNumber() >= HighestAll(StoCrossBar) and StochasticFull()."FullK" > StochasticFull()."FullD"
then crossPrice
else Double.NaN;
hLine.SetPaintingStrategy(PaintingStrategy.LINE);
hLine.SetDefaultColor(Color.ORANGE);
hLine.SetLineWeight(5);
# End Stochastic Full Cross Horizontal Line
```