TheLark

TheLark: Directional Movement Index Stochastic

There is a nice writeup about a system that uses DMISTO here, which includes decent statistics:
traderedge.net/2013/...obability-reversals/

I have not yet done any back testing on the system as a whole myself, but thought the DMISTO was an interesting indicator, so ported it over for those who might want to play with it and create their own systems. I added dots that denote signals similar to the system described above, which can be turned off if desired.
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
study(title="TheLark: Directional Movement Index Stochastic", shorttitle="DMISTO_LK", overlay=false)

        //•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//   
        //                                             //
        //              DMISTO BY THELARK              //
        //                 ~ 8-4-14 ~                  //
        //                                             //
        //                     •/•                     //
        //                                             //
        //    https://www.tradingview.com/u/TheLark    //
        //                                             //
        //•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//

// Wells Wilders MA
wwma(l,p) =>
    wwma = (nz(wwma[1]) * (l - 1) + p) / l

// Inputs
DMIlength = input(10,title="DMI Length")
Avglength = input(3, title="Avg Length")
ShowDots = input(true)
ob = input(90,title="Over Bought")
os = input(10,title="Over Sold")

// Osc Calc
hiDiff = high - high[1]
loDiff = low[1] - low
plusDM = (hiDiff > loDiff) and (hiDiff > 0) ? hiDiff : 0
minusDM = (loDiff > hiDiff) and (loDiff > 0) ? loDiff : 0
ATR = wwma(DMIlength, tr)
PlusDI = 100 * wwma(DMIlength,plusDM) / ATR
MinusDI = 100 * wwma(DMIlength,minusDM) / ATR
osc = PlusDI - MinusDI

// STO
hh = highest(osc,DMIlength)
ll = lowest(osc,DMIlength)
sto = 100 * (osc-ll) / (hh-ll)
kslow = sma(sto, Avglength)
perd = sma(kslow,Avglength)

// Plots
plot(ob,color=gray)
plot(os,color=gray)
plot(ShowDots ? kslow[1] < perd[1] and kslow > perd and perd < os ? os : na : na,style=circles,color=lime,linewidth=2)
plot(ShowDots ? kslow[1] > perd[1] and kslow < perd and perd > ob ? ob : na : na,style=circles,color=orange,linewidth=2)
plot(kslow, color=#0EAAEF,title="DMISTO-slow",linewidth=1)
plot(perd, color=red,title="DMISTO-slow",linewidth=1)
//plot(sto, color=#0EAAEF,title="DMISTO",linewidth=1)