Индикатор Stochastic Oscillator на платформе Thinkorswim | Форум по Бинарным Опционам - Binaryforum.ru

Индикатор Stochastic Oscillator на платформе Thinkorswim

PocketOption

#1
Уважаемые,может кто подскажет как установить на платформе Thinkorswim индикатор Stochastik Oscillator? Если это возможно..Спасибо..
 

Paul

New member
#2
СергейФ сказал(а):
Уважаемые,может кто подскажет как установить на платформе Thinkorswim индикатор Stochastik Oscillator? Если это возможно..Спасибо..

В тосе индюка этого нет. надо искать его в инете и импортировать в тос.
 

admin

Administrator
Член команды
#3
# Adaptive Stohastic Oscillator with Nad
# Last Update 15 Feb 2010

declare lower;

Def formula = (((close - open) / volume) / open) * 100;
Def SELLING = volume / (((formula * volume) / 100) + 2);
Def BUYING = volume - SELLING;
def diff = BUYING - SELLING;
Def suma = sum(DIFF, 120) ;
input AvgAdaptiveStohastic = 9;
def ma = Average(suma,AvgAdaptiveStohastic);
def NAD =ceil(ma);
input OverboughtOversoldSensitivity=0.2;
def Overbought_Oversold_Sensitivity=AvgAdaptiveStohastic*OverboughtOversoldSensitivity;

#translate from croatian duljina=length
input length0 = 3;
input length1 = 7;
input length2 = 12;
input length3 = 18;
input length4 = 25;
input length5 = 33;
input length6 = 42;
input length7 = 52;
#translate from croatian duljina=length

def duljina0 = length0;
def duljina1 = length1;
def duljina2 = length2;
def duljina3 = length3;
def duljina4 = length4;
def duljina5 = length5;
def duljina6 = length6;
def duljina7 = length7;

input longLength = 262;
input shortLength = 20;

def hi = Highest(high,duljina0);
def lo = Lowest(low, duljina0);
def fstoh0 = (100 * ((close - lo) / (hi - lo)));
def kor = correlation(close, fstoh0, duljina0);
def hi1 = Highest(high, duljina1);
def lo1 = Lowest(low, duljina1);
def fstoh1 = (100 * ((close - lo1) / (hi1 - lo1)));
def kor1 = correlation(close, fstoh1, duljina1);
def hi2 = Highest(high, duljina2);
def lo2 = Lowest(low, duljina2);
def fstoh2 = (100 * ((close - lo2) / (hi2 - lo2)));
def kor2 = correlation(close, fstoh2, duljina2);
def hi3 = Highest(high, duljina3);
def lo3 = Lowest(low, duljina3);
def fstoh3 = (100 * ((close - lo3) / (hi3 - lo3)));
def kor3 = correlation(close, fstoh3, duljina3);
def hi4 = Highest(high, duljina4);
def lo4 = Lowest(low, duljina4);
def fstoh4 = (100 * ((close - lo4) / (hi4 - lo4)));
def kor4 = correlation(close, fstoh4, duljina4);
def hi5 = Highest(high, duljina5);
def lo5 = Lowest(low, duljina5);
def fstoh5 = (100 * ((close - lo5) / (hi5 - lo5)));
def kor5 = correlation(close, fstoh5, duljina5);
def hi6 = Highest(high, duljina6);
def lo6 = Lowest(low, duljina6);
def fstoh6 = (100 * ((close - lo6) / (hi6 - lo6)));
def kor6 = correlation(close, fstoh6, duljina6);
def hi7 = Highest(high, duljina7);
def lo7 = Lowest(low, duljina7);
def fstoh7 = (100 * ((close - lo7) / (hi7 - lo7)));
def kor7 = correlation(close, fstoh7, duljina7);

def fstohx = if kor > kor1 and kor > kor2 and kor > kor3 and kor > kor4 and kor > kor5 and kor > kor6 and kor > kor7 then fstoh0 else if kor1 > kor and kor1 > kor2 and kor1 > kor3 and kor1 > kor4 and kor1 > kor5 and kor1 > kor6 and kor1 > kor7 then fstoh1 else 0;
def fstoha = if kor2 > kor and kor2 > kor1 and kor2 > kor3 and kor2 > kor4 and kor2 > kor5 and kor2 > kor6 and kor2 > kor7 then fstoh2 else if kor3 > kor and kor3 > kor1 and kor3 > kor2 and kor3 > kor4 and kor3 > kor5 and kor3 > kor6 and kor3 > kor7 then fstoh3 else 0;
def fstohb = if kor4 > kor and kor4 > kor1 and kor4 > kor2 and kor4 > kor3 and kor4 > kor5 and kor4 > kor6 and kor4 > kor7 then fstoh4 else if kor5 > kor and kor5 > kor1 and kor5 > kor2 and kor5 > kor3 and kor5 > kor4 and kor5 > kor6 and kor5 > kor7 then fstoh5 else 0;
def fstohc = if kor6 > kor1 and kor6 > kor2 and kor6 > kor3 and kor6 > kor4 and kor6 > kor5 and kor6 > kor and kor6 > kor7 then fstoh6 else if kor7 > kor1 and kor7 > kor2 and kor7 > kor3 and kor7 > kor4 and kor7 > kor5 and kor7 > kor6 and kor7 > kor then fstoh7 else 0;

def fstohd = if fstohx > fstoha and fstohx > fstohb and fstohx > fstohc then fstohx else if fstoha > fstohx and fstoha > fstohb and fstoha > fstohc then fstoha else 0;
def fstohe = if fstohb > fstohx and fstohb > fstoha and fstohb > fstohc then fstohb else if fstohc > fstohx and fstohc > fstohb and fstohc > fstohb then fstohc else 0;
def AdaptiveStohastic = if (fstohd > fstohe ,fstohd ,fstohe);
plot MovingAvgStoh = Average(AdaptiveStohastic, AvgAdaptiveStohastic );

def clLog = Log(close / close[1]);
def HV =2* (stdev(clLog, shortLength) * Sqrt(shortLength * longLength / (shortLength - 1)));

def hihi=highestall(MovingAvgStoh);
def lolo=lowestall(MovingAvgStoh);
def raz=hihi-lolo;

plot overbought=hihi-(raz*Overbought_Oversold_Sensitivity*hv);
plot oversold=lolo+(raz*Overbought_Oversold_Sensitivity*hv);

plot down = if((((movingavgstoh > overbought and movingavgstoh < movingavgstoh[1])or (movingavgstoh[1]> overbought and movingavgstoh movingavgstoh[1])or (movingavgstoh[1]< oversold and movingavgstoh>oversold))and nad > nad[1]), movingavgstoh, Double.Nan);
up.SetPaintingStrategy(paintingStrategy.arrow_up);
up.setDefaultColor(Color.Dark_Green);
down.setDefaultColor(Color.Dark_Red);
MovingAvgStoh.setDefaultColor(Color.Black);
MovingAvgStoh.SetLineWeight(2);
Overbought.setDefaultColor(Color.red);
OverSold.SetDefaultColor(Color.green);
Попробуйте этот код.