Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- study(title="HUGO-Original", shorttitle="scalp_test", overlay=true)
- MA = sma(close, 102)
- plot(MA, color =#DF01A5, title="102", linewidth=3, transp=0)
- //..................................................................Hugo Scalp
- len5 = input(title="1st Length", type=integer, defval=20, minval=1)
- src5 = input(title="1st Source", type=source, defval=close)
- len6 = input(title="2nd Length", type=integer, defval=50, minval=1)
- src6 = input(title="2nd Source", type=source, defval=close)
- len7 = input(title="3rd Length", type=integer, defval=80, minval=1)
- src7 = input(title="3rd Source", type=source, defval=close)
- hma1 = wma(2 * wma(src5, len5 / 2) - wma(src5, len5), round(sqrt(len5)))
- hma2 = wma(2 * wma(src6, len6 / 2) - wma(src6, len6), round(sqrt(len6)))
- hma3 = wma(2 * wma(src7, len7 / 2) - wma(src7, len7), round(sqrt(len7)))
- plot(hma1, title="1", linewidth=2, color= #01fff7, transp=0)
- plot(hma2, title="2", linewidth=3, color= blue, transp=0)
- plot(hma3, title="3", linewidth=3, color= red, transp=0)
- //plot(cross(hma1, hma2) ? hma2 : na, color = (hma1 - hma2 > 0 ? lime : red) , style = circles, linewidth = 5, transp=0)
- plot(cross(hma2, hma3) ? hma3 : na, color = (hma2 - hma3 > 0 ? lime : red) , style = cross, linewidth = 5, transp=0)
- //plot(cross(hma1, hma3) ? hma3 : na, color = (hma1 - hma3 > 0 ? lime : red) , style = circles, linewidth = 5, transp=0)
- //------------------------------------------------------ Pablo Picasso
- emaBase = input(60, minval=1, title="EmaB")
- emaConversion = input(120, minval=1, title="EmaC")
- leadLine1 = ema(close, emaBase)
- leadLine2 = ema(close, emaConversion)
- p1 = plot(leadLine1, color=green, transp=0,
- title="Lead 1")
- p2 = plot(leadLine2, color=red, transp=0,
- title="Lead 2")
- fill(p1, p2, color = leadLine1 > leadLine2 ? green : red)
- plot(cross(leadLine1, leadLine2) ? leadLine2 : na, color = (leadLine1 - leadLine2 > 0 ? lime : red) , transp=0)
- //.....................................................................
- length=input(21)
- src=close
- ema1=ema(src, length)
- ema2=ema(ema1, length)
- d=ema1-ema2
- zlema=ema1+d
- plot(zlema, title="4", linewidth=1, color= white, transp=0)
- plot(cross(zlema, hma2) ? hma2 : na, color = (zlema - hma2 > 0 ? lime : red) , style = circles, linewidth = 5, transp=0)
- plot(cross(zlema, hma3) ? hma3 : na, color = (zlema - hma3 > 0 ? lime : red) , style = circles, linewidth = 5, transp=0)
- //............................................................. Strategie Sell - Buy
- //longCond=crossover(hma2,hma3)
- //shortCond=crossover(hma3,hma2)
- //strategy.entry("LONG", strategy.long, when=longCond)
- //strategy.entry("SHORT", strategy.short, when=shortCond)
- //strategy.exit("EXLONG", from_entry="LONG", when=shortCond)
- //strategy.exit("EXSHORT", from_entry="SHORT", when=longCond)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement