Indicator shows incorrectly since update to V11
Forums › ProRealTime English forum › ProBuilder support › Indicator shows incorrectly since update to V11
- This topic has 5 replies, 3 voices, and was last updated 4 years ago by Razz.
-
-
12/14/2020 at 10:01 AM #153644
Good Morning My indicator that shows me the open range no longer works correctly after the update to V11, I was able to fix the missing filling of the rectangles via line 37 bodercolor. But my main problem with the labeling is partly double and in the wrong place. The indicator was only displayed for the current day since V11 goes back and I don’t want to have it either. Can someone help me there? thanks
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148DefParam CalculateOnLastBars = 1400 // 1400 enough for one day (23h) when using 1min timeframe// --- initalpha = max(alpha,0)alpha = min(alpha,255)// --- endstarttime = 080500 // 08h00 Depending on the timeframeendtime = 090000 // 09h00if time = starttime thenstartbar = barindexendifif time = endtime thenendbar = barindexendifif time >= starttime and time <= endtime thenif high > hh thenhh = highendifif low < ll or ll = 0 thenll = lowendifendifif intradaybarindex = 0 thenhh = 0ll = 0endifif date = today and time > endtime then //draw Box OpenRange (OPR) only for todayDrawRectangle(startbar,hh,endbar,ll) coloured(0,255,255,100)// alpha (transparence)DrawRectangle(startbar,hh,endbar,ll) coloured(135,206,250,50)bordercolor(0,0,0,0)endifif date = today and time = endtime then // High/Low/Opening only for todayupper = highest[12](high)lower = lowest[12](low)op = closedif = round(abs(upper-lower))OMitte = upper-(dif/4)Mitte = upper-(dif/2)UMitte = lower+(dif/4)exto = upper+(dif*0.236)extu = lower-(dif*0.236)exto38 = upper+(dif*0.382)extu38 = lower-(dif*0.382)exto61 = upper+(dif*0.618)extu61 = lower-(dif*0.618)exto100 = upper+(dif*1)extu100 = lower-(dif*1)exto161 = upper+(dif*1.618)extu161 = lower-(dif*1.618)exto200 = upper+(dif*2.0)extu200 = lower-(dif*2.0)exto261 = upper+(dif*2.618)extu261 = lower-(dif*2.618)exto423 = upper+(dif*4.236)extu423 = lower-(dif*4.236)exto585 = upper+(dif*5.854)extu585 = lower-(dif*5.854)info = info // draw the info OPR, High, Low, Using Timeframe as textelsif info = 1 thenDrawText("#dif#Punkte",startbar+4,upper+(delta+6),SansSerif,Standard,12) coloured(255,255,255)DrawText("#hh#",startbar+4,upper+(delta),SansSerif,Standard,12) coloured(0,255,255)DrawText("#ll#",startbar+4,lower-(delta),SansSerif,Standard,12) coloured(0,255,255)//DrawText("Timeframe #Time1o5o10o15# min.",startbar+5,lower-(delta+5),SansSerif,Standard,12) coloured(255,0,255,alpha)if Marken = 1 thenDrawText("23,6%",startbar+8,extu,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("38,2%",startbar+8,extu38,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("61,8%",startbar+8,extu61,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("100%",startbar+8,extu100,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("161,8%",startbar+8,extu161,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("200%",startbar+8,extu200,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("261,8%",startbar+8,extu261,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("423,6%",startbar+8,extu423,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("585,4%",startbar+8,extu585,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("Long/Short",startbar+8,Mitte, SansSerif,Bold,12)coloured(255,255,255,120) //MitteDrawText("23,6%",startbar+8,exto,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("38,2%",startbar+8,exto38,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("61,8%",startbar+8,exto61,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("100%",startbar+8,exto100,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("161,8%",startbar+8,exto161,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("200%",startbar+8,exto200,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("261,8%",startbar+8,exto261,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("423,6%",startbar+8,exto423,SansSerif,Bold,12) coloured(0,191,255,200)DrawText("585,4%",startbar+8,exto585,SansSerif,Bold,12) coloured(0,191,255,200)endifendifOpenClose=1if date = today and time >= endtime and time <= 220000 thenIf HighLow = 1 then// Draw Segment High,Low and Opening from OPR, as Support/Resist, to select timeDrawSegment(barindex-HighLow,upper,barindex,upper) coloured(0,255,255,alpha) // High OPRDrawSegment(barindex-HighLow,lower,barindex,lower) coloured(0,255,255,alpha) // Low OPRendifIf AnzeigeOpenCl = 1 then// Draw Segment High,Low and Opening from OPR, as Support/Resist, to select timeDrawSegment(barindex-OpenClose,op,barindex,op) coloured(255,0,204,alpha) // Opening//DrawSegment(barindex-OpenClose,cl,barindex,cl) coloured(255,0,0,alpha) //Close YesterdayendifIf Faecher = 1 then// Draw Segment High,Low and Opening from OPR, as Support/Resist, to select timeDrawSegment(barindex-OpenClose,OMitte,barindex,OMitte) coloured(255,255,255,100) //obenDrawSegment(barindex-OpenClose,Mitte,barindex,Mitte) coloured(255,255,255,120) //MitteDrawSegment(barindex-OpenClose,UMitte,barindex,UMitte) coloured(255,255,255,100) //untenendifIf Ext = 1 thenDrawSegment(barindex-OpenClose,exto,barindex,exto) coloured(30,144,255,150) //Ziel 23,6% obenDrawSegment(barindex-OpenClose,extu,barindex,extu) coloured(30,144,255,150) //Ziel 23,6% untenDrawSegment(barindex-OpenClose,exto38,barindex,exto38) coloured(30,144,255,150) //Ziel 38,2% obenDrawSegment(barindex-OpenClose,extu38,barindex,extu38) coloured(30,144,255,150) //Ziel 38,2% untenDrawSegment(barindex-OpenClose,exto61,barindex,exto61) coloured(30,144,255,180)//Ziel 61,8% obenDrawSegment(barindex-OpenClose,extu61,barindex,extu61) coloured(30,144,255,180)//Ziel 61,8% untenDrawSegment(barindex-OpenClose,exto38,barindex,exto38) coloured(30,144,255,180)//Ziel 100% obenDrawSegment(barindex-OpenClose,extu38,barindex,extu38) coloured(30,144,255,180)//Ziel 100% untenDrawSegment(barindex-OpenClose,exto100,barindex,exto100) coloured(30,144,255,180)//Ziel 100% obenDrawSegment(barindex-OpenClose,extu100,barindex,extu100) coloured(30,144,255,180)//Ziel 100% untenDrawSegment(barindex-OpenClose,exto161,barindex,exto161) coloured(30,144,255,255) //Ziel 161,8% obenDrawSegment(barindex-OpenClose,extu161,barindex,extu161) coloured(30,144,255,255) //Ziel 161,8% untenDrawSegment(barindex-OpenClose,exto200,barindex,exto200) coloured(0,191,255,255) //Ziel 200% obenDrawSegment(barindex-OpenClose,extu200,barindex,extu200) coloured(0,191,255,255) //Ziel 200% untenDrawSegment(barindex-OpenClose,exto261,barindex,exto261) coloured(0,191,255,255) //Ziel 261,8% obenDrawSegment(barindex-OpenClose,extu261,barindex,extu261) coloured(0,191,255,255) //Ziel 261,8% untenDrawSegment(barindex-OpenClose,exto423,barindex,exto423) coloured(0,191,255,255) //Ziel 423,6 obenDrawSegment(barindex-OpenClose,extu423,barindex,extu423) coloured(0,191,255,255) //Ziel 423,6% untenDrawSegment(barindex-OpenClose,exto585,barindex,exto585) coloured(0,191,255,255) //Ziel 585,4% obenDrawSegment(barindex-OpenClose,extu585,barindex,extu585) coloured(0,191,255,255) //Ziel 585,4% untenendifendifreturn12/14/2020 at 1:38 PM #15368412/14/2020 at 1:59 PM #153692Hi, didn’t run the code but I see you use “today” keyword. There was a topic where it was discussed behaviour of “today” has changed, a request has been made a couple of weeks ago by Nicolas to be able to use the old behaviour. So in a future update there should be 2 keywords to be able to use the old and the new behaviour. Don’t know when…
1 user thanked author for this post.
12/14/2020 at 2:00 PM #153693I think the problem is because of the condition : “date = today”.
TODAY instruction has “evolved” in v11. Today is not the today’s date in real time anymore, it is the date of each day past in history too..
Let me try a fix and I let you know.
1 user thanked author for this post.
12/14/2020 at 2:02 PM #15369412/14/2020 at 2:09 PM #153696 -
AuthorPosts
Find exclusive trading pro-tools on