Indicator shows incorrectly since update to V11

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #153644 quote
    Razz
    Participant
    Master

    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

    DefParam CalculateOnLastBars = 1400 // 1400 enough for one day (23h) when using 1min timeframe
    
    // --- init
    alpha = max(alpha,0)
    alpha = min(alpha,255)
    // --- end
    
    
    starttime = 080500 // 08h00 Depending on the timeframe
    endtime = 090000   // 09h00
    
    if time = starttime then
    startbar = barindex
    endif
    if time = endtime then
    endbar = barindex
    endif
    
    if time >= starttime and time <= endtime then
    if high > hh then
    hh = high
    endif
    if low < ll or ll = 0 then
    ll = low
    endif
    endif
    
    if intradaybarindex = 0 then
    hh = 0
    ll = 0
    endif
    
    
    
    if date = today and time > endtime then //draw Box OpenRange (OPR) only for today
    DrawRectangle(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)
    endif
    
    if date = today and time = endtime then // High/Low/Opening only for today
    upper = highest[12](high)
    lower = lowest[12](low)
    op = close
    dif = 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 text
    elsif info = 1 then
    DrawText("#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 then
    
    DrawText("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)  //Mitte
    
    DrawText("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)
    endif
    
    endif
    
    
    OpenClose=1
    
    if date = today and time >= endtime and time <= 220000 then
    If HighLow = 1 then// Draw Segment High,Low and Opening from OPR, as Support/Resist, to select time
    DrawSegment(barindex-HighLow,upper,barindex,upper) coloured(0,255,255,alpha) // High OPR
    DrawSegment(barindex-HighLow,lower,barindex,lower) coloured(0,255,255,alpha) // Low OPR
    
    endif
    If AnzeigeOpenCl = 1 then// Draw Segment High,Low and Opening from OPR, as Support/Resist, to select time
    DrawSegment(barindex-OpenClose,op,barindex,op) coloured(255,0,204,alpha) // Opening
    //DrawSegment(barindex-OpenClose,cl,barindex,cl) coloured(255,0,0,alpha)  //Close Yesterday
    endif
    If Faecher = 1 then// Draw Segment High,Low and Opening from OPR, as Support/Resist, to select time
    DrawSegment(barindex-OpenClose,OMitte,barindex,OMitte) coloured(255,255,255,100)  //oben
    DrawSegment(barindex-OpenClose,Mitte,barindex,Mitte) coloured(255,255,255,120)  //Mitte
    DrawSegment(barindex-OpenClose,UMitte,barindex,UMitte) coloured(255,255,255,100)  //unten
    endif
    If Ext = 1 then
    
    DrawSegment(barindex-OpenClose,exto,barindex,exto) coloured(30,144,255,150)  //Ziel 23,6% oben
    DrawSegment(barindex-OpenClose,extu,barindex,extu) coloured(30,144,255,150)  //Ziel 23,6% unten
    DrawSegment(barindex-OpenClose,exto38,barindex,exto38) coloured(30,144,255,150)  //Ziel 38,2% oben
    DrawSegment(barindex-OpenClose,extu38,barindex,extu38) coloured(30,144,255,150)  //Ziel 38,2% unten
    DrawSegment(barindex-OpenClose,exto61,barindex,exto61) coloured(30,144,255,180)//Ziel 61,8% oben
    DrawSegment(barindex-OpenClose,extu61,barindex,extu61) coloured(30,144,255,180)//Ziel 61,8% unten
    DrawSegment(barindex-OpenClose,exto38,barindex,exto38) coloured(30,144,255,180)//Ziel 100% oben
    DrawSegment(barindex-OpenClose,extu38,barindex,extu38) coloured(30,144,255,180)//Ziel 100% unten
    DrawSegment(barindex-OpenClose,exto100,barindex,exto100) coloured(30,144,255,180)//Ziel 100% oben
    DrawSegment(barindex-OpenClose,extu100,barindex,extu100) coloured(30,144,255,180)//Ziel 100% unten
    DrawSegment(barindex-OpenClose,exto161,barindex,exto161) coloured(30,144,255,255)  //Ziel 161,8% oben
    DrawSegment(barindex-OpenClose,extu161,barindex,extu161) coloured(30,144,255,255)  //Ziel 161,8% unten
    DrawSegment(barindex-OpenClose,exto200,barindex,exto200) coloured(0,191,255,255)  //Ziel 200% oben
    DrawSegment(barindex-OpenClose,extu200,barindex,extu200) coloured(0,191,255,255)  //Ziel 200% unten
    DrawSegment(barindex-OpenClose,exto261,barindex,exto261) coloured(0,191,255,255)  //Ziel 261,8% oben
    DrawSegment(barindex-OpenClose,extu261,barindex,extu261) coloured(0,191,255,255)  //Ziel 261,8% unten
    DrawSegment(barindex-OpenClose,exto423,barindex,exto423) coloured(0,191,255,255)  //Ziel 423,6 oben
    DrawSegment(barindex-OpenClose,extu423,barindex,extu423) coloured(0,191,255,255)  //Ziel 423,6% unten
    DrawSegment(barindex-OpenClose,exto585,barindex,exto585) coloured(0,191,255,255)  //Ziel 585,4% oben
    DrawSegment(barindex-OpenClose,extu585,barindex,extu585) coloured(0,191,255,255)  //Ziel 585,4% unten
    
    
    endif
    
    endif
    
    return
    V11.jpg V11.jpg
    #153684 quote
    Razz
    Participant
    Master
    I hope for your support because I don’t know what is causing the error!
    #153692 quote
    JC_Bywan
    Moderator
    Master

    Hi, 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…

    Razz thanked this post
    #153693 quote
    Nicolas
    Keymaster
    Master

    I 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.

    Razz thanked this post
    #153694 quote
    Nicolas
    Keymaster
    Master

    Could you please share the itf file in your next message, as the code you have posted is not complete (the external settings are missing..).

    #153696 quote
    Razz
    Participant
    Master

    Hello Nicolas / Nobywan Thank you for trying to help me

    Opening-Range-0900-V5-V11.itf
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Indicator shows incorrectly since update to V11


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Razz @razz Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by Razz
5 years, 2 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/14/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...