Harigami
ログイン
Harigamiは、ログイン不要のコード共有サービスです。コードの投稿後に発行されるURLでコードを共有できます。
PythonやRubyなど一部の言語は、投稿後にオンラインで実行することもできます。
誰でも無料で使えて、広告もありません。コードレビューやスニペットの代わりに使ってみてください。


詳細設定
+
anonymous タイトルなし
HTML
Twitterでは、
#クリエイターズファクトリー
#CF課題
などのハッシュタグをつけて投稿してくれると嬉しいです!
  • 0
  • 1
anonymous タイトルなし
HTML
<p><strong>👇雑談や質問が気軽にできる♪&nbsp;ジャパカジ掲示板</strong></p>
<p>ユーザー同士の交流や雑談、ジャパカジスタッフへの<a href="/forum" target="_blank" title="">お問い合わせ</a>、なんでも大歓迎!</p>
<div><a href="/forum" title=""><img alt="ジャパカジ掲示板はじめました!詳細ページへ" class="full hidden-xs" src="/images/home/images/casino-forum-ad-pc_1502x192.jpg" style="" /><img alt="ジャパカジ掲示板はじめました!詳細ページへ" class="full visible-xs" font-size:10px="" src="/images/home/images/casino-forum-ad-mobile_702x178.jpg" style="" /></a></div>
  • 0
  • 0
anonymous タイトルなし
Python
<p><strong>👇雑談や質問が気軽にできる♪&nbsp;ジャパカジ掲示板</strong></p>
<p>ユーザー同士の交流や雑談、ジャパカジスタッフへの<a href="/forum" target="_blank" title="">お問い合わせ</a>、なんでも大歓迎!</p>
<div><a href="/forum" title=""><img alt="ジャパカジ掲示板はじめました!詳細ページへ" class="full hidden-xs" src="/images/home/images/casino-forum-ad-pc_1502x192.jpg" style="" /><img alt="ジャパカジ掲示板はじめました!詳細ページへ" class="full visible-xs" font-size:10px="" src="/images/home/images/casino-forum-ad-mobile_702x178.jpg" style="" /></a></div>
  • 0
  • 0
anonymous タイトルなし
Python
//@version=3
strategy("Parabolic SAR Strategy", overlay=true)

start = input(0.02)
increment = input(0.02)
maximum = input(0.2)

psar = sar(start, increment, maximum)

if (psar >= high)
    strategy.entry("ParLE", strategy.long, stop=psar, comment="LONG")
else
    strategy.cancel("ParLE")

if (psar <= low)
    strategy.entry("ParSE", strategy.short, stop=psar, comment="SHORT")
else
    strategy.cancel("ParSE")

plot(psar,color=lime,style =circles,linewidth = 2)
  • 0
  • 0
anonymous タイトルなし
Python
//@version=3
strategy("Stochastic Slow Strategy", overlay=false)
length = input(14, minval=1)
OverBought = input(80)
OverSold = input(20)
smoothK = 3
smoothD = 3

k = sma(stoch(close, high, low, length), smoothK)
d = sma(k, smoothD)

if (not na(k) and not na(d))
    if (crossover(k,d) and k < OverSold)
        strategy.entry("StochLE", strategy.long, comment="LONG")
    if (crossunder(k,d) and k > OverBought)
        strategy.entry("StochSE", strategy.short, comment="SHORT")

plot(OverBought,color=red,style=3)
plot(OverSold,color=lime,style=3)
plot(k,color=aqua)
plot(d,color=purple)
  • 0
  • 0
anonymous タイトルなし
Python
//@version=3
strategy("Momentum Strategy", overlay=false)
length = input(12)
price = close

momentum(seria, length) =>
    mom = seria - seria[length]
    mom

mom0 = momentum(price, length)
mom1 = momentum( mom0, 1)

if (mom0 > 0 and mom1 > 0)
    strategy.entry("MomLE", strategy.long, stop=high+syminfo.mintick, comment="LONG")
else
    strategy.cancel("MomLE")

if (mom0 < 0 and mom1 < 0)
    strategy.entry("MomSE", strategy.short, stop=low-syminfo.mintick, comment="SHORT")
else
    strategy.cancel("MomSE")

plot(mom0,color=lime)
plot(mom1,color=red)
hline(0)
  • 0
  • 0
anonymous タイトルなし
Python
//@version=3
study(title = "RCI3lines optimized", shorttitle = "RCI3lines opt") 

itvs = input(9, "short interval")
itvm = input(36, "middle interval")
itvl = input(52, "long interval")
src = input(close, "source")
res = input(9, "resolution", minval=9)
upperband=input(title="High line[%]",defval=80,type=integer)
lowerband=input(title="Low line[%]",defval=-80,type=integer)
dd = res * (res*res-1) / 100 

ord(seq, idx, itv) =>
    p = seq[idx]
    o = 1
    for i = 0 to res-1
        o := o + ((p < seq[i*itv]) ? 1 : 0)
    o

d(itv) =>
    sum = 0.0
    step = itv/res
    for i = 0 to res-1
        x = (i + 1) - ord(src, i*step, step)
        sum := sum + x*x
    sum

rci(itv) => sma(100.0 - 6.0 * d(itv) / dd, ceil(itv/res))

hline(upperband,color=gray,linestyle=dashed)
hline(lowerband,color=gray,linestyle=dashed)
plot(rci(itvs), title = "RCI short", color = red)
plot(rci(itvm), title = "RCI middle", color = blue)
plot(rci(itvl), title = "RCI long", color = green)
  • 0
  • 0
anonymous タイトルなし
Python
//@version=3
study('DCCGMMA', overlay=true)
//クラウド

len1=input(3, title="転換線")
len2=input(5, title="基準線")
len3=input(9, title="転換線")
len4=input(10, title="基準線")
len5=input(12, title="転換線")
len6=input(15, title="基準線")
len7=input(18, title="転換線")
len8=input(26, title="基準線")
len9=input(37, title="転換線")
len10=input(42, title="基準線")
len11=input(50, title="転換線")
len12=input(60, title="基準線")
upper1 = highest(len1)
lower1 = lowest(len1)
upper2 = highest(len2)
lower2 = lowest(len2)
upper3 = highest(len3)
lower3 = lowest(len3)
upper4 = highest(len4)
lower4 = lowest(len4)
upper5 = highest(len5)
lower5 = lowest(len5)
upper6 = highest(len6)
lower6 = lowest(len6)
upper7 = highest(len7)
lower7 = lowest(len7)
upper8 = highest(len8)
lower8 = lowest(len8)
upper9 = highest(len9)
lower9= lowest(len9)
upper10 = highest(len10)
lower10 = lowest(len10)
upper11 = highest(len11)
lower11 = lowest(len11)
upper12 = highest(len12)
lower12 = lowest(len12)
fast1 = avg(upper1, lower1)
fast2 = avg(upper2, lower2)
fast3 = avg(upper3, lower3)
fast4 = avg(upper4, lower4)
fast5 = avg(upper5, lower5)
fast6 = avg(upper6, lower6)
slow1 = avg(upper7, lower7)
slow2 = avg(upper8, lower8)
slow3 = avg(upper9, lower9)
slow4 = avg(upper10, lower10)
slow5 = avg(upper11, lower11)
slow6 = avg(upper12, lower12)
//カラー等
plot(fast1, color=yellow)
plot(fast2, color=orange)
plot(fast3, color=red)
plot(fast4, color=maroon)
plot(fast5, color=fuchsia)
plot(fast6, color=purple)
plot(slow1, color=navy)
plot(slow2, color=blue)
plot(slow3, color=aqua)
plot(slow4, color=teal)
plot(slow5, color=lime)
plot(slow6, color=green)
  • 0
  • 0
anonymous タイトルなし
Python
//@version=3
study("DONCROSS", overlay=false)

len1=input(9, title="転換線")
len2=input(26, title="基準線")
upper1 = highest(len1)
lower1= lowest(len1)
upper2 = highest(len2)
lower2= lowest(len2)
basis1= avg(upper1, lower1)
basis2= avg(upper2, lower2)

plot(basis1,color=lime)
plot(basis2,color=red)
  • 0
  • 0
anonymous タイトルなし
Python
//@version=3
study(title = "BB GMMA")

source = hlc3
length = input(20, minval=1), mult = input(2.0, minval=0.001, maxval=50)
len = input(3, minval=1, title="FASTMA")
len2 = input(15, minval=1, title="FASTMA2")
len3 = input(30, minval=1, title="SLOWMA")
len4 = input(60, minval=1, title="SLOWMA2")
hiline = input(0.8, "HL")
lowline = input(0.2, "LL")
//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 = wma(br,len)
er2 = wma(br,len2)
er3 = wma(br,len3)
er4 = wma(br,len4)

//COLOR
plot(br, color=na)
mc = er > er2 ? lime:red
mc2 = er3 > er4 ? aqua:orange
plot(er, title="FMA", style=line, linewidth=1, color=mc,transp=10)
plot(er2, title="FMA2", style=line, linewidth=1, color=mc,transp=10)
plot(er3, title="SMA", style=line, linewidth=1, color=mc2,transp=10)
plot(er4, title="SMA2", style=line, linewidth=1, color=mc2,transp=10)

fill(plot(er), plot(er2), color = mc,transp=50)
fill(plot(er3), plot(er4), color = mc2,transp=50)
plot(hiline, title="HL",color=gray,style =circles,linewidth = 1)
plot(lowline, title="LL",color=gray,style =circles,linewidth = 1)
  • 0
  • 0