Slow Stochastic Price Chart Label?

H

Hopperious

New member
VIP
Is there a way to have the Slow Stochastic shown as a Label on the price chart instead of on the lower study as a line.

Code:
# Slow Smooth STOCHASTIC

input N2_Period = 9;
input R2_Period = 6;

def Ln2 = Lowest(low, N2_Period);
def Hn2 = Highest(high, N2_Period);
def Y2 = ((close - Ln2) / (Hn2 - Ln2)) * 100;
def X2 = ExpAverage(Y2, R2_Period);


def Lxn = Lowest(X2, N2_Period);
def Hxn = Highest(X2, N2_Period);
def DSS = ((X2 - Lxn) / (Hxn - Lxn)) * 100;


def DSSb = ExpAverage(DSS, R2_Period);
#DSSb.setdefaultColor(Color.YELLOW);

plot DSSsignal = DSSb[1];
DSSsignal.AssignValueColor(if DSSb > DSSsignal then Color.DARK_GREEN else Color.DARK_RED);
DSSsignal.SetLineWeight(3);
The Label "Slow Stoch" would turn dark_green when greater and dark_red when less as the DSSsignal.AssignValueColor shows above on the last line of the code - color would only change at the close of each bar
 
Last edited by a moderator:
T

timh

New member
Hello,

Can anyone convert the Stochastic Slow indicator from TradeStation to Thinkscrip or does anyone has that script already? I am trying to find one or edited it, with no luck.

Thanks in advance,
Tim
 
T

timh

New member
@timh It's as easy as searching it in your ThinkorSwim

Yes, it is, but the numbers and setting is different between them, TS stochastic slow default setting is 14,3,3,1,20, TOS only has 10,10. Just couldn't find it anywhere, hopefully someone here has that script, thanks for your help.
 
rad14733

rad14733

Active member
VIP
Yes, it is, but the numbers and setting is different between them, TS stochastic slow default setting is 14,3,3,1,20, TOS only has 10,10. Just couldn't find it anywhere, hopefully someone here has that script, thanks for your help.
Just change the settings to match and it should paint fairly close to the same as in TradeStation...
 

Similar threads

Top