Forums › ProRealTime forum Français › Support ProBuilder › Problème sur indicateur Fibonacci Open Range › Reply To: Problème sur indicateur Fibonacci Open Range
04/28/2025 at 7:40 PM
#246493
Je remets le code
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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
/--------------------------------------------// //PRC_Fibonacci Open Range //version = 0 //13.01.2025 //Iván González @ www.prorealcode.com //Sharing ProRealTime knowledge //--------------------------------------------// // inputs //--------------------------------------------// //ORBegin=090000 //OREnd=100000 //ShowpastFibo=1 //--------------------------------------------// // Calculate Open Range //--------------------------------------------// if gettimeframe<=3600 then once ORHigh=0 once ORLow=9999999 once FibExtDown1 = 0 // Puntos de Fibonacci ORWidth = ORHigh - ORLow FibMid = (ORHigh + ORLow) / 2 FibExtUp1 = ORHigh + ORWidth * (0.618) FibExtDown1 = ORLow - ORWidth * (0.618) FibExtUp2 = ORHigh + ORWidth * (1.000) FibExtDown2 = ORLow - ORWidth * (1.000) FibExtUp3 = ORHigh + ORWidth * (1.618) FibExtDown3 = ORLow - ORWidth * (1.618) FibExtUp4 = ORHigh + ORWidth * (2.000) FibExtDown4 = ORLow - ORWidth * (2.000) FibExtUp5 = ORHigh + ORWidth * (2.618) FibExtDown5 = ORLow - ORWidth * (2.618) FibExtUp6 = ORHigh + ORWidth * (3.000) FibExtDown6 = ORLow - ORWidth * (3.000) if opentime>=ORBegin and opentime[1]<ORBegin then drawsegment(OREndIdx,ORHigh,barindex,ORHigh)coloured("red")style(line,4) drawsegment(OREndIdx,ORLow,barindex,ORLow)coloured("green")style(line,4) drawsegment(OREndIdx,FibMid,barindex,FibMid)coloured("blue")style(dottedline,5) drawsegment(OREndIdx,ORLow,barindex,ORLow)coloured("green")style(line,4) if ShowpastFibo then drawsegment(OREndIdx,FibExtDown1,barindex,FibExtDown1)coloured("green")style(dottedline,4) drawsegment(OREndIdx,FibExtDown2,barindex,FibExtDown2)coloured("green")style(dottedline,4) drawsegment(OREndIdx,FibExtDown3,barindex,FibExtDown3)coloured("green")style(dottedline,4) drawsegment(OREndIdx,FibExtDown4,barindex,FibExtDown4)coloured("green")style(dottedline,4) drawsegment(OREndIdx,FibExtDown5,barindex,FibExtDown5)coloured("green")style(dottedline,4) drawsegment(OREndIdx,FibExtDown6,barindex,FibExtDown6)coloured("green")style(dottedline,4) drawsegment(OREndIdx,FibExtUp1,barindex,FibExtUp1)coloured("red")style(dottedline,4) drawsegment(OREndIdx,FibExtUp2,barindex,FibExtUp2)coloured("red")style(dottedline,4) drawsegment(OREndIdx,FibExtUp3,barindex,FibExtUp3)coloured("red")style(dottedline,4) drawsegment(OREndIdx,FibExtUp4,barindex,FibExtUp4)coloured("red")style(dottedline,4) drawsegment(OREndIdx,FibExtUp5,barindex,FibExtUp5)coloured("red")style(dottedline,4) drawsegment(OREndIdx,FibExtUp6,barindex,FibExtUp6)coloured("red")style(dottedline,4) endif ORHigh=high ORLow=low ORBeginIdx=barindex drawvline(barindex)style(dottedline,2)coloured("DARKRED") elsif opentime>=ORBegin and opentime<=OREnd then ORHigh=max(ORHigh,high) ORLow=min(ORLow,low) elsif opentime>OREnd and opentime[1]<=OREnd then OREndIdx=barindex[1] drawsegment(ORBeginIdx,ORHigh,OREndIdx,ORHigh)coloured("red")style(line,5) drawsegment(ORBeginIdx,ORLow,OREndIdx,ORLow)coloured("green")style(line,5) elsif islastbarupdate then drawsegment(barindex+10,ORHigh,OREndIdx,ORHigh)coloured("red")style(line,3) drawsegment(barindex+10,ORLow,OREndIdx,ORLow)coloured("green")style(line,3) drawsegment(OREndIdx,FibMid,barindex+10,FibMid)coloured("blue")style(dottedline,4) //drawtext("middle 09H-10H",barindex+15,fibmid,dialog,bold,15)coloured ("blue") drawsegment(OREndIdx,ORLow,barindex+10,ORLow)coloured("green")style(line,3) drawsegment(OREndIdx,FibExtDown1,barindex+10,FibExtDown1)coloured("green")style(dottedline,4) drawtext("0.618",barindex+15,fibextdown1,dialog,bold,15)coloured ("green") drawsegment(OREndIdx,FibExtDown2,barindex+10,FibExtDown2)coloured("green")style(dottedline,4) drawtext("1.000",barindex+15,fibextdown2,dialog,bold,15)coloured ("green") drawsegment(OREndIdx,FibExtDown3,barindex+10,FibExtDown3)coloured("green")style(dottedline,4) drawtext("1.618",barindex+15,fibextdown3,dialog,bold,15)coloured ("green") drawsegment(OREndIdx,FibExtDown4,barindex+10,FibExtDown4)coloured("green")style(dottedline,4) drawtext("2.000",barindex+15,fibextdown4,dialog,bold,15)coloured ("green") drawsegment(OREndIdx,FibExtDown5,barindex+10,FibExtDown5)coloured("green")style(dottedline,4) drawtext("2.618",barindex+15,fibextdown5,dialog,bold,15)coloured ("green") drawsegment(OREndIdx,FibExtDown6,barindex+10,FibExtDown6)coloured("green")style(dottedline,4) drawtext("3.000",barindex+15,fibextdown6,dialog,bold,15)coloured ("green") drawsegment(OREndIdx,FibExtUp1,barindex+10,FibExtUp1)coloured("red")style(dottedline,4) drawtext("0.618",barindex+15,fibextup1,dialog,bold,15)coloured ("red") drawsegment(OREndIdx,FibExtUp2,barindex+10,FibExtUp2)coloured("red")style(dottedline,4) drawtext("1.000",barindex+15,fibextup2,dialog,bold,15)coloured ("red") drawsegment(OREndIdx,FibExtUp3,barindex+10,FibExtUp3)coloured("red")style(dottedline,4) drawtext("1.618",barindex+15,fibextup3,dialog,bold,15)coloured ("red") drawsegment(OREndIdx,FibExtUp4,barindex+10,FibExtUp4)coloured("red")style(dottedline,4) drawtext("2.000",barindex+15,fibextup4,dialog,bold,15)coloured ("red") drawsegment(OREndIdx,FibExtUp5,barindex+10,FibExtUp5)coloured("red")style(dottedline,4) drawtext("2.618",barindex+15,fibextup5,dialog,bold,15)coloured ("red") drawsegment(OREndIdx,FibExtUp6,barindex+10,FibExtUp6)coloured("red")style(dottedline,4) drawtext("3.000",barindex+15,fibextup6,dialog,bold,15)coloured ("red") else ORHigh=ORHigh ORLow=ORLow endif endif //--------------------------------------------// return |