code ist falsch geht nicht warum??? für den fibonacci bogen
defparam drawonlastbaronly=true
PeriodSMA1=100 // Period of the SMA for the first Fibonacci point
PeriodSMA2=200 // Period of the SMA for the last Fibonacci point
Decalage=0.5 // Distance to display the line name above the Fibonacci line, in points.
SMA1=average[PeriodSMA1](close)
SMA2=average[PeriodSMA2](close)
if barindex = PeriodSMA1-1 then
point1=SMA1
barindex1=barindex
endif
Point2=SMA2
if islastbarupdate then
Distance=Point1-Point2
// 0% line
DRAWTEXT(“0,00%”, barindex+10, Point2+Decalage*PointSize)
DRAWRAY(barindex1, Point1, barindex, Point2) STYLE(DOTTEDLINE,3) COLOURED(“brown”)
// Fibonacci-Level Definition
Fib1 = 0.236
Fib2 = 0.382
Fib3 = 0.5
Fib4 = 0.618
Fib5 = 0.786
Fib6 = 1.0
// Fibonacci-Bögen zeichnen
for i = 1 to 6 do
if i = 1 then fibLevel = Fib1
if i = 2 then fibLevel = Fib2
if i = 3 then fibLevel = Fib3
if i = 4 then fibLevel = Fib4
if i = 5 then fibLevel = Fib5
if i = 6 then fibLevel = Fib6
fibValue = Point2 + Distance * fibLevel
// Fibonacci-Bogen als Halbkreis zeichnen
DRAWARC(barindex1, Point1, barindex, fibValue, 180, 360) STYLE(DOTTEDLINE,2) COLOURED(“red”)
// Beschriftung für Fibonacci-Level
DRAWTEXT(string(fibLevel * 100) + “%”, barindex + 10, fibValue + Decalage*PointSize)
next
endif
return