RicardoSantos

[RS]Monthly Dynamic Range Levels (Fibonaci) V0

Monthly fibonaci range analysis and system
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?
study("[RS]Monthly Dynamic Range Levels (Fibonaci) V0", overlay=true)
Optional_TimeFrame = input('M')

M_HIGH = security(tickerid, Optional_TimeFrame, high)
M_OPEN = security(tickerid, Optional_TimeFrame, open)
M_LOW = security(tickerid, Optional_TimeFrame, low)

H_RANGE = M_HIGH-M_OPEN
L_RANGE = M_OPEN-M_LOW

H_236 = M_HIGH - H_RANGE * 0.236
H_382 = M_HIGH - H_RANGE * 0.382
H_500 = M_HIGH - H_RANGE * 0.500
H_618 = M_HIGH - H_RANGE * 0.618
H_764 = M_HIGH - H_RANGE * 0.764

L_236 = M_LOW + L_RANGE * 0.236
L_382 = M_LOW + L_RANGE * 0.382
L_500 = M_LOW + L_RANGE * 0.500
L_618 = M_LOW + L_RANGE * 0.618
L_764 = M_LOW + L_RANGE * 0.764

plot(M_HIGH, color=M_HIGH != M_HIGH[1] ?na:black, style=line, linewidth=1)

plot(H_236, color=H_236 != H_236[1] ?na:gray, style=line, linewidth=1)
plot(H_382, color=H_382 != H_382[1] ?na:black, style=line, linewidth=1)
plot(H_500, color=H_500 != H_500[1] ?na:red, style=line, linewidth=1)
plot(H_618, color=H_618 != H_618[1] ?na:black, style=line, linewidth=1)
plot(H_764, color=H_764 != H_764[1] ?na:gray, style=line, linewidth=1)

plot(M_OPEN, color=M_OPEN != M_OPEN[1] ?na:blue, style=line, linewidth=2)

plot(L_236, color=L_236 != L_236[1] ?na:gray, style=line, linewidth=1)
plot(L_382, color=L_382 != L_382[1] ?na:black, style=line, linewidth=1)
plot(L_500, color=L_500 != L_500[1] ?na:red, style=line, linewidth=1)
plot(L_618, color=L_618 != L_618[1] ?na:black, style=line, linewidth=1)
plot(L_764, color=L_764 != L_764[1] ?na:gray, style=line, linewidth=1)

plot(M_LOW, color=M_LOW != M_LOW[1] ?na:black, style=line, linewidth=1)

SHOW_MA = input(false)
MA_SRC = input(hlc3)
MA_LENGTH = input(21)

_MA = ema(MA_SRC, MA_LENGTH)
plot(not SHOW_MA ? na : _MA, color=teal, linewidth=2)

SHOW_SIGNALS = input(true)

BUYX(_F) => cross(_F, MA_SRC) and rising(_MA, 1)
SELX(_F) => cross(_F, MA_SRC) and falling(_MA, 1)

SEL_SIGNAL = SELX(H_236) or SELX(H_382) or SELX(H_500) or SELX(H_618) or SELX(H_764) or
        SELX(L_236) or SELX(L_382) or SELX(L_500) or SELX(L_618) or SELX(H_764)

BUY_SIGNAL = BUYX(H_236) or BUYX(H_382) or BUYX(H_500) or BUYX(H_618) or BUYX(H_764) or
        BUYX(L_236) or BUYX(L_382) or BUYX(L_500) or BUYX(L_618) or BUYX(H_764)

plotshape(not SHOW_SIGNALS ? na : SEL_SIGNAL ? M_HIGH : na, style=shape.labeldown, location=location.absolute, text='-', color=maroon, textcolor=white, transp=0)
plotshape(not SHOW_SIGNALS ? na : BUY_SIGNAL ? M_LOW : na, style=shape.labelup, location=location.absolute, text='+', color=green, textcolor=white, transp=0)