Harigami
ログイン
LC23 タイトルなし
Python
study(title="GB10Y+EMA", shorttitle="GB10Y+EMA")

// Security

gb10y_C = security("TVC:GB10Y", period, close)
gb10y_H = security("TVC:GB10Y", period, high)
gb10y_L = security("TVC:GB10Y", period, low)

//EMA

EMA1 = input(20, minval=1, title="EMA1"),
EMA2 = input(75, minval=1, title="EMA2")

// Plots
a = plot(gb10y_H, style=line,  linewidth=1, color=aqua)
b = plot(gb10y_L, style=line,  linewidth=1, color=aqua)
fill(a, b, color=gray, transp = 80)
plot(gb10y_C, style=line,  linewidth=3,transp=5, color=aqua)
plot(ema(gb10y_C, EMA1), color=lime,transp=5, linewidth=1)
plot(ema(gb10y_C, EMA2), color=white,transp=5, linewidth=1)
  • 0
  • 1
anonymous タイトルなし
Python
Satisfy note a gooddonation recompense you. http://qryzithmanchi.tk/1l9l
  • 0
  • 0
anonymous タイトルなし
Python
a = input('Hello>')
print("Hello :", a)
  • 0
  • 0
Tomoaki Sugiyama タイトルなし
Python
  • 0
  • 0
LC23 タイトルなし
Python
//@version=3
study("MA20MTF GMMA", overlay=true)

// SMA or EMA
SEswitch = input(title="on:EMA off:SMA", type=bool, defval=true)

//Set resolutions
resA = input(title='5M', type=resolution, defval="1")
resB = input(title='15M', type=resolution, defval="1")
resC = input(title='30M', type=resolution, defval="1")
resD = input(title='1H', type=resolution, defval="1")
resE = input(title='4H', type=resolution, defval="1")

//get data
dataA = security(tickerid, resA, sma(close, 100))
dataB = security(tickerid, resB, sma(close, 300))
dataC = security(tickerid, resC, sma(close, 600))
dataD = security(tickerid, resD, sma(close, 1200))
dataE = security(tickerid, resE, sma(close, 4800))


//Plotting
plot(dataA , color=gray, linewidth=1)
AL=plot(dataB , color=lime, linewidth=1)
BL=plot(dataC , color=lime, linewidth=1)
CL=plot(dataD , color=red, linewidth=1)
DL=plot(dataE , color=red, linewidth=1)
fill(AL,BL ,color=lime,transp=80)
fill(CL,DL ,color=red,transp=80)
  • 0
  • 1
anonymous タイトルなし
Python
//@version=3
study("MTF 8 SMA/EMA", overlay=true)

// SMA or EMA
SEswitch = input(title="on:EMA off:SMA", type=bool, defval=true)

//Get EMA Values
maA = input(title='MA1 期間', type=integer, minval=1, step=1, defval=10)
maB = input(title='MA2 期間', type=integer, minval=1, step=1, defval=75)
maC = input(title='MA3 期間', type=integer, minval=1, step=1, defval=10)
maD = input(title='MA4 期間', type=integer, minval=1, step=1, defval=20)
maE = input(title='MA5 期間', type=integer, minval=1, step=1, defval=75)
maF = input(title='MA6 期間', type=integer, minval=1, step=1, defval=10)
maG = input(title='MA7 期間', type=integer, minval=1, step=1, defval=75)
maH = input(title='MA8 期間', type=integer, minval=1, step=1, defval=10)

//Set resolutions
resA = input(title='MA1 時間足', type=resolution, defval="15")
resB = input(title='MA2 時間足', type=resolution, defval="15")
resC = input(title='MA3 時間足', type=resolution, defval="60")
resD = input(title='MA4 時間足', type=resolution, defval="60")
resE = input(title='MA5 時間足', type=resolution, defval="60")
resF = input(title='MA6 時間足', type=resolution, defval="240")
resG = input(title='MA7 時間足', type=resolution, defval="240")
resH = input(title='MA8 時間足', type=resolution, defval="1440")

//Set switches
emaAswitch = input(title="MA1 On/Off", type=bool, defval=true)
emaBswitch = input(title="MA2 On/Off", type=bool, defval=true)
emaCswitch = input(title="MA3 On/Off", type=bool, defval=true)
emaDswitch = input(title="MA4 On/Off", type=bool, defval=true)
emaEswitch = input(title="MA5 On/Off", type=bool, defval=true)
emaFswitch = input(title="MA6 On/Off", type=bool, defval=true)
emaGswitch = input(title="MA7 On/Off", type=bool, defval=true)
emaHswitch = input(title="MA8 On/Off", type=bool, defval=true)

//get data
dataA = security(tickerid, resA, SEswitch ? ema(close, maA) : sma(close, maA))
dataB = security(tickerid, resB, SEswitch ? ema(close, maB) : sma(close, maB))
dataC = security(tickerid, resC, SEswitch ? ema(close, maC) : sma(close, maC))
dataD = security(tickerid, resD, SEswitch ? ema(close, maD) : sma(close, maD))
dataE = security(tickerid, resE, SEswitch ? ema(close, maE) : sma(close, maE))
dataF = security(tickerid, resF, SEswitch ? ema(close, maF) : sma(close, maF))
dataG = security(tickerid, resG, SEswitch ? ema(close, maG) : sma(close, maG))
dataH = security(tickerid, resH, SEswitch ? ema(close, maH) : sma(close, maH))


//Plotting
plot(emaAswitch ? dataA : na, color=lime, linewidth=3)
plot(emaBswitch ? dataB : na, color=aqua, linewidth=3)
plot(emaCswitch ? dataC : na, color=orange, linewidth=3)
plot(emaDswitch ? dataD : na, color=yellow, linewidth=3)
plot(emaEswitch ? dataE : na, color=olive, linewidth=3)
plot(emaFswitch ? dataF : na, color=fuchsia, linewidth=3)
plot(emaGswitch ? dataG : na, color=maroon, linewidth=3)
plot(emaHswitch ? dataH : na, color=white, linewidth=4)

study("London_NY", overlay=true)
t1 = time(period, "0900-1700")
t2 = time(period, "1600-2200")
t3 = time(period, "2100-0600")

tokyo = na(t1) ? na : blue
London = na(t2) ? na : white
NY = na(t3) ? na : black

bgcolor(tokyo, title1="tokyo")
bgcolor(London, title2="London")
bgcolor(NY, title3="NY")
  • 0
  • 0
anonymous タイトルなし
Python
//@version=3
study(title="MTF Bollinger Bands", shorttitle="MTF 3 BB", overlay=true)

onoffA = input(true, "BB1 ON/OFF")
resA = input(title='BB1時間足 (BB1 Time Frame)', type=resolution, defval="60")
sigmaA = input(1,title='BB1偏差 (BB1 Sigma)', step=1, minval=1, maxval=3)
onoffB = input(true, "BB2 ON/OFF")
resB = input(title='BB2時間足 (BB1 Time Frame)', type=resolution, defval="60")
sigmaB = input(2,title='BB2偏差 (BB2 Sigma)', step=1, minval=1, maxval=3)
onoffC = input(true, "BB3 ON/OFF")
resC = input(title='BB4時間足 (BB1 Time Frame)', type=resolution, defval="60")
sigmaC = input(3,title='BB3偏差 (BB3 Sigma)', step=1, minval=1, maxval=3)

devA = security(tickerid, resA, stdev(close,20))
basisA = security(tickerid, resA, sma(close,20))
devB = security(tickerid, resB, stdev(close,20))
basisB = security(tickerid, resB, sma(close,20))
devC = security(tickerid, resC, stdev(close,20))
basisC = security(tickerid, resC, sma(close,20))


upper_1 = onoffA ? (basisA + devA * sigmaA) : na
lower_1 = onoffA ? (basisA - devA * sigmaA) : na
upper_2 = onoffB ? (basisB + devB * sigmaB) : na
lower_2 = onoffB ? (basisB - devB * sigmaB) : na
upper_3 = onoffC ? (basisC + devC * sigmaC) : na
lower_3 = onoffC ? (basisC - devC * sigmaC) : na


plot(basisA, color=red,title='BB1 Basis')
plot(basisB, color=orange,title='BB2 Basis')
plot(basisC, color=red,title='BB3 Basis')
u1 = plot(upper_1, color=blue,title='BB1 Upper')
l1 = plot(lower_1, color=blue,title='BB1 Lower')
u2 = plot(upper_2, color=green,title='BB2 Upper')
l2 = plot(lower_2, color=green,title='BB2 Lower')
u3 = plot(upper_3, color=purple,title='BB3 Upper')
l3 = plot(lower_3, color=purple,title='BB3 Lower')

fill(u1,l1, color=white, transp=90,title='BB1')
fill(u2,l2, color=white, transp=90,title='BB2')
fill(u3,l3, color=white, transp=90,title='BB3')
  • 0
  • 0
anonymous タイトルなし
Python
  • 0
  • 0
anonymous タイトルなし
Python
//@version=3

study(title = "AWABI改アラート")

source = hlc3
length = input(26, minval=1), multi = input(2.0, minval=0.001,title="σ", maxval=50,title="BBRSI")
len = input(14, minval=1, title="FASTMA")
len2 = input(20, minval=1, title="SLOWMA")

//RSI
rsi1 = rsi(source, length)

// BB of RSI
basis = wma(rsi1, length)
dev = multi * stdev(rsi1, length)
upper = basis + dev
lower = basis - dev
br = (rsi1 - lower)/(upper - lower)
obLevel1 = input(1, "HLINE")
obLevel2 = input(0.5, "MLINE")
obLevel3 = input(0, "LLINE")
//MA OF RSI
er = wma(br,len)
er2 = wma(br,len2)


//アラート条件
LONG = crossover(br,er)
SHORT = crossunder(br,er)
FASTBAND = crossover(er,er2)
SLOWBAND = crossunder(er,er2)

switch = 0
setA = 0
setB = 0

if (LONG and (switch[1] == 0))
    switch := 1
    setA := 1
    setB := 0
else    
    if (SHORT and (switch[1] == 0))
        switch := 0
        setA := 0
        setB := 1
    else
        switch := nz(switch[0],0)
        setA := 0
        setB := 0
        
//コメント
alertcondition(setA, title = "LONG", message = "買って❤")
alertcondition(setB, title = "SHORT", message = "売って❤")

//COLOR
mc = er > er2 ? lime:red
plot(br, color=aqua)
plot(obLevel1, title="ov1",color=silver, style=3)
plot(obLevel2, title="ov2",color=silver, style=3)
plot(obLevel3, title="ov3",color=silver, style=3)
plot(er, title="MA1", style=line, linewidth=1, color=mc,transp=10)
plot(er2, title="MA2", style=line, linewidth=1, color=mc,transp=10)
fill(plot(er), plot(er2), color = mc)
bgcolor(FASTBAND ? green : na, transp=90, offset=-1)
bgcolor(SLOWBAND ? red : na, transp=90, offset=-1)
  • 0
  • 0
LC23 タイトルなし
Python
//@version=3
study(title = "BBMA-PO")

source = hlc3
length = input(20, minval=1), mult = input(2.0, minval=0.001, maxval=50)
len = input(15, minval=1, title="FASTMA")
len2 = input(20, minval=1, title="FASTMA2")
len3 = input(35, minval=1, title="FASTMA3")
len4 = input(55, minval=1, title="SLOWMA")
len5 = input(85, minval=1, title="SLOWMA2")
len6 = input(120, minval=1, title="SLOWMA3")
hiline = input(0.8, "HL")
lowline = input(0.2, "LL")
showPerfectOrder = input(title="Show Perfect Order?", type=bool, defval=true)
//RSI
rsi1 = rsi(source, length)

// BB of RSI
basis = sma(rsi1, length)
dev = mult * stdev(rsi1, length)
upper = basis + dev
lower = basis - dev
br = (rsi1 - lower)/(upper - lower)

//MA OF RSI
er = ema(br,len)
er2 = ema(br,len2)
er3 = ema(br,len3)
er4 = ema(br,len4)
er5 = ema(br,len5)
er6 = ema(br,len6)
//COLOR

plot(er, title="FMA", style=line, linewidth=1, color=lime,transp=10)
plot(er2, title="FMA2", style=line, linewidth=1, color=red,transp=10)
plot(er3, title="FMA3", style=line, linewidth=1, color=yellow,transp=10)
plot(er4, title="SMA", style=line, linewidth=1, color=purple,transp=10)
plot(er5, title="SMA2", style=line, linewidth=1, color=aqua,transp=10)
plot(er6, title="SMA3", style=line, linewidth=1, color=orange,transp=10)
plot(hiline, title="HL",color=gray,style =circles,linewidth = 1)
plot(lowline, title="LL",color=gray,style =circles,linewidth = 1)

perfectOrderByUpTrend = er[1] > er2[1] and er3[1] > er4[1] and er5[1] > er6[1] ? true : false
perfectOrderByDownTrend = er[1] < er2[1] and er3[1] < er4[1] and er5[1] < er6[1] ? true : false
bgcolor(perfectOrderByUpTrend and showPerfectOrder ? green : white, transp=90, offset=-1)
bgcolor(perfectOrderByDownTrend and showPerfectOrder ? red : white, transp=90, offset=-1)
  • 0
  • 0
あなたもコードを投稿しませんか?
投稿する