Harigami
ログイン
LC23 タイトルなし
No License Python
コピー
//@version=3

study(title = "AWABI改")

source = hlc3
length = input(26, minval=1), multi = input(2.0, minval=0.001,title="シグマ", maxval=50)
len = input(14, minval=1, title="MA1")
len2 = input(20, minval=1, title="MA2")

//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, "Over Bought Level 1")
obLevel2 = input(0.5, "Over Bought Level 2")
obLevel3 = input(0, "Over Bought Level 3")
//MA OF RSI
er = wma(br,len)
er2 = wma(br,len2)

//ENTRY条件
LONG = crossover(er,er2)
SHORT = 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] == 1))
        switch := 0
        setA := 0
        setB := 1
    else
        switch := nz(switch[1],0)
        setA := 0
        setB := 0



alertcondition(setA, title = "LONG", message = "LLLLL!")
alertcondition(setB, title = "SHORT", message = "SSSSS!")



//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)
//@version=3

study(title = "AWABI改")

source = hlc3
length = input(26, minval=1), multi = input(2.0, minval=0.001,title="シグマ", maxval=50)
len = input(14, minval=1, title="MA1")
len2 = input(20, minval=1, title="MA2")

//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, "Over Bought Level 1")
obLevel2 = input(0.5, "Over Bought Level 2")
obLevel3 = input(0, "Over Bought Level 3")
//MA OF RSI
er = wma(br,len)
er2 = wma(br,len2)

//ENTRY条件
LONG = crossover(er,er2)
SHORT = 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] == 1))
        switch := 0
        setA := 0
        setB := 1
    else
        switch := nz(switch[1],0)
        setA := 0
        setB := 0



alertcondition(setA, title = "LONG", message = "LLLLL!")
alertcondition(setB, title = "SHORT", message = "SSSSS!")



//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)
コンソール
現在、コメントはありません。
最初のコメンターになりませんか?