Forums › ProRealTime Deutsch forum › ProBuilder Support › Fibonaccibogen Programmier code › Reply To: Fibonaccibogen Programmier code
03/24/2025 at 3:21 PM
#245213
Versuchen Sie dies, aber Sie müssen die Position ändern, an der gedruckt werden soll.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
defparam drawonlastbaronly=true PeriodSMA1=610 PeriodSMA2=377 Decalage=0.5 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 DRAWTEXT("0,00%", barindex+10, Point2+Decalage*PointSize) DRAWRAY(barindex1, Point1, barindex, Point2) STYLE(DOTTEDLINE,3) COLOURED("brown") // Fibonacci-Level Definition (kein Array!) Fib1 = 0.236 Fib2 = 0.382 Fib3 = 0.5 Fib4 = 0.618 Fib5 = 0.786 Fib6 = 1.0 for i = 1 to 6 do if i = 1 then fibLevel = Fib1 endif if i = 2 then fibLevel = Fib2 endif if i = 3 then fibLevel = Fib3 endif if i = 4 then fibLevel = Fib4 endif if i = 5 then fibLevel = Fib5 endif if i = 6 then fibLevel = Fib6 endif fibValue = Point2 + Distance * fibLevel angle = 0 while angle <= 180 x1 = barindex1 + (barindex - barindex1) * (angle / 180) y1 = fibValue + (sin(angle) * Distance * 0.5) x2 = barindex1 + (barindex - barindex1) * ((angle + 20) / 180) y2 = fibValue + (sin(angle + 20) * Distance * 0.5) //DRAWRAY(x1, y1, x2, y2) STYLE(DOTTEDLINE,2) COLOURED("red") DRAWELLIPSE(x1,y1,x2,y2) COLOURED("Red") angle = angle + 20 wend textLabel = fibLevel * 100 DRAWTEXT("#textLabel#", barindex + 10, fibValue) next endif return |