prc_ict-killzones-and-pivots Mittellinien der Boxen hinzufügen

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #246890 quote
    Razz
    Participant
    Master

    Guten Morgen

    Ich finde den Indikator super , wäre es möglich den Boxen Mittellinien hinzuzufügen (als zb. graue gepunktete Mittellinie)

    Das wäre echt super

    ICT Killzones and Pivots: Time Zones and Pivots

    #246892 quote
    robertogozzi
    Moderator
    Master

    Hier ist der geänderte Code, in dem ich den Parameter ShowMidLine hinzugefügt habe, um auszuwählen, ob die Mittellinie gedruckt werden soll oder nicht (verwenden Sie die angehängte ITF-Datei):

    //----------------------------------------------//
    //PRC_ICT Killzones and Pivots
    //version = 0
    //10.10.2024
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //----------------------------------------------//
    //-----INPUTS-----------------------------------//
    //----------------------------------------------//
    //openAS=020000
    //closeAS=060000
    //openLO=080000
    //closeLO=110000
    //openNYam=153000
    //closeNYam=170000
    //openNYlch=180000
    //closeNYlch=190000
    //openNYpm=193000
    //closeNYpm=220000
    //ShowNylch=1
    //ShowMidLine=1
    openNY=openNYam
    closeNY=closeNYpm
    limitday=180000
    openTrueDay=060000
    
    if gettimeframe<=3600 then
    //----------------------------------------------//
    //-----ASIA Zone--------------------------------//
    //----------------------------------------------//
    once maxHighAS=high
    once minLowAS=low
    if opentime>=openAS and opentime<=closeAS then
    barAS=barAS+1
    if high>=maxHighAS then
    maxHighAS=high
    else
    maxHighAS=maxHighAS
    endif
    if low<=minLowAS then
    minLowAS=low
    else
    minLowAS=minLowAS
    endif
    endif
    if opentime=closeAS then
    drawrectangle(barindex[barAS],minLowAS,barindex,maxHighAS)coloured("blue")fillcolor("blue",30)
    IF ShowMidLine THEN
    MidRange = (maxHighAS - minLowAS) / 2
    MidPrice = minLowAS + MidRange
    drawsegment(barindex[barAS],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("AS.H: #maxHighAS#",barindex[round(barAS/2)],maxHighAS+0.3*tr)
    drawtext("AS.L: #minLowAS#",barindex[round(barAS/2)],minLowAS-0.3*tr)
    prevLowAS=minLowAS
    prevHighAS=maxHighAS
    previdxAS=barindex
    barAS=0
    minLowAS=high*100
    maxHighAS=0
    endif
    if low crosses under prevLowAS then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    prevLowAS=0
    elsif opentime=limitday and prevLowAS<>0 then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    prevLowAS=0
    elsif islastbarupdate and prevLowAS<>0 then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    endif
    if high crosses over prevHighAS then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    prevHighAS=0
    elsif opentime=limitday and prevHighAS<>0 then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    prevHighAS=0
    elsif islastbarupdate and prevHighAS<>0 then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    endif
    //----------------------------------------------//
    //-----London Zone------------------------------//
    //----------------------------------------------//
    once maxHighLO=high
    once minLowLO=low
    if opentime>=openLO and opentime<=closeLO then
    barLO=barLO+1
    if high>=maxHighLO then
    maxHighLO=high
    else
    maxHighLO=maxHighLO
    endif
    if low<=minLowLO then
    minLowLO=low
    else
    minLowLO=minLowLO
    endif
    endif
    if opentime=closeLO then
    drawrectangle(barindex[barLO],minLowLO,barindex,maxHighLO)coloured("red")fillcolor("red",30)
    IF ShowMidLine THEN
    MidRange = (maxHighLO - minLowLO) / 2
    MidPrice = minLowLO + MidRange
    drawsegment(barindex[barLO],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("LO.H: #maxHighLO#",barindex[round(barLO/2)],maxHighLO+0.3*tr)
    drawtext("LO.L: #minLowLO#",barindex[round(barLO/2)],minLowLO-0.3*tr)
    prevLowLO=minLowLO
    prevHighLO=maxHighLO
    previdxLO=barindex
    barLO=0
    minLowLO=high*100
    maxHighLO=0
    endif
    if low crosses under prevLowLO then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    prevLowLO=0
    elsif opentime=limitday and prevLowLO<>0 then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    prevLowLO=0
    elsif islastbarupdate and prevLowLO<>0 then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    endif
    if high crosses over prevHighLO then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    prevHighLO=0
    elsif opentime=limitday and prevHighLO<>0 then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    prevHighLO=0
    elsif islastbarupdate and prevHighLO<>0 then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    endif
    if ShowNylch then
    //----------------------------------------------//
    //-----New York AM------------------------------//
    //----------------------------------------------//
    once maxHighNYam=high
    once minLowNYam=low
    if opentime>=openNYam and opentime<=closeNYam then
    barNYam=barNYam+1
    if high>=maxHighNYam then
    maxHighNYam=high
    else
    maxHighNYam=maxHighNYam
    endif
    if low<=minLowNYam then
    minLowNYam=low
    else
    minLowNYam=minLowNYam
    endif
    endif
    if opentime=closeNYam then
    drawrectangle(barindex[barNYam],minLowNYam,barindex,maxHighNYam)coloured("green")fillcolor("green",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYam - minLowNYam) / 2
    MidPrice = minLowNYam + MidRange
    drawsegment(barindex[barNYam],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("NYam.H: #maxHighNYam#",barindex[round(barNYam/2)],maxHighNYam+0.3*tr)
    drawtext("NYam.L: #minLowNYam#",barindex[round(barNYam/2)],minLowNYam-0.3*tr)
    prevLowNYam=minLowNYam
    prevHighNYam=maxHighNYam
    previdxNYam=barindex
    barNYam=0
    minLowNYam=high*100
    maxHighNYam=0
    endif
    if low crosses under prevLowNYam then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    prevLowNYam=0
    elsif opentime=limitday and prevLowNYam<>0 then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    prevLowNYam=0
    elsif islastbarupdate and prevLowNYam<>0 then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    endif
    if high crosses over prevHighNYam then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    prevHighNYam=0
    elsif opentime=limitday and prevHighNYam<>0 then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    prevHighNYam=0
    elsif islastbarupdate and prevHighNYam<>0 then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    endif
    //----------------------------------------------//
    //-----New York lunch Zone----------------------//
    //----------------------------------------------//
    once maxHighNYlch=high
    once minLowNYlch=low
    if opentime>=openNYlch and opentime<=closeNYlch then
    barNYlch=barNYlch+1
    if high>=maxHighNYlch then
    maxHighNYlch=high
    else
    maxHighNYlch=maxHighNYlch
    endif
    if low<=minLowNYlch then
    minLowNYlch=low
    else
    minLowNYlch=minLowNYlch
    endif
    endif
    if opentime=closeNYlch then
    drawrectangle(barindex[barNYlch],minLowNYlch,barindex,maxHighNYlch)coloured("yellow")fillcolor("yellow",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYlch - minLowNYlch) / 2
    MidPrice = minLowNYlch + MidRange
    drawsegment(barindex[barNYlch],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    prevLowNYlch=minLowNYlch
    prevHighNYlch=maxHighNYlch
    previdxNYlch=barindex
    barNYlch=0
    minLowNYlch=high*100
    maxHighNYlch=0
    endif
    //----------------------------------------------//
    //-----New York PM -----------------------------//
    //----------------------------------------------//
    once maxHighNYpm=high
    once minLowNYpm=low
    if opentime>=openNYpm and opentime<=closeNYpm then
    barNYpm=barNYpm+1
    if high>=maxHighNYpm then
    maxHighNYpm=high
    else
    maxHighNYpm=maxHighNYpm
    endif
    if low<=minLowNYpm then
    minLowNYpm=low
    else
    minLowNYpm=minLowNYpm
    endif
    endif
    if opentime=closeNYpm then
    drawrectangle(barindex[barNYpm],minLowNYpm,barindex,maxHighNYpm)coloured("purple")fillcolor("purple",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYpm - minLowNYpm) / 2
    MidPrice = minLowNYpm + MidRange
    ENDIF
    drawsegment(barindex[barNYpm],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    drawtext("NYpm.H: #maxHighNYpm#",barindex[round(barNYpm/2)],maxHighNYpm+0.3*tr)
    drawtext("NYpm.L: #minLowNYpm#",barindex[round(barNYpm/2)],minLowNYpm-0.3*tr)
    prevLowNYpm=minLowNYpm
    prevHighNYpm=maxHighNYpm
    previdxNYpm=barindex
    barNYpm=0
    minLowNYpm=high*100
    maxHighNYpm=0
    endif
    if low crosses under prevLowNYpm then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    prevLowNYpm=0
    elsif opentime=limitday and prevLowNYpm<>0 then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    prevLowNYpm=0
    elsif islastbarupdate and prevLowNYpm<>0 then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    endif
    if high crosses over prevHighNYpm then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    prevHighNYpm=0
    elsif opentime=limitday and prevHighNYpm<>0 then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    prevHighNYpm=0
    elsif islastbarupdate and prevHighNYpm<>0 then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    endif
    else
    once maxHighNY=high
    once minLowNY=low
    if opentime>=openNY and opentime<=closeNY then
    barNY=barNY+1
    if high>=maxHighNY then
    maxHighNY=high
    else
    maxHighNY=maxHighNY
    endif
    if low<=minLowNY then
    minLowNY=low
    else
    minLowNY=minLowNY
    endif
    endif
    if opentime=closeNY then
    drawrectangle(barindex[barNY],minLowNY,barindex,maxHighNY)coloured("purple")fillcolor("purple",30)
    drawtext("NY.H: #maxHighNY#",barindex[round(barNY/2)],maxHighNY+0.3*tr)
    drawtext("NY.L: #minLowNY#",barindex[round(barNY/2)],minLowNY-0.3*tr)
    prevLowNY=minLowNY
    prevHighNY=maxHighNY
    previdxNY=barindex
    barNY=0
    minLowNY=high*100
    maxHighNY=0
    endif
    if low crosses under prevLowNY then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    prevLowNY=0
    elsif opentime=limitday and prevLowNY<>0 then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    prevLowNY=0
    elsif islastbarupdate and prevLowNY<>0 then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    endif
    if high crosses over prevHighNY then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    prevHighNY=0
    elsif opentime=limitday and prevHighNY<>0 then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    prevHighNY=0
    elsif islastbarupdate and prevHighNY<>0 then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    endif
    endif
    //----------------------------------------------//
    //-----Limit Day--------------------------------//
    //----------------------------------------------//
    if opentime=openTrueDay then
    openTD=open
    barTD=barindex
    else
    if opentime=limitday then
    drawvline(barindex)style(dottedline)
    drawsegment(barTD,openTD,barindex,openTD)style(dottedline1)
    endif
    endif
    else
    drawtext("Change timeframe to 1hr or less",0,0,SansSerif,bold,34)anchor(middle,xshift,yshift)
    endif
    return
    Razz and Iván González thanked this post
    #246898 quote
    Razz
    Participant
    Master

    Hallo  robertogozzi

    Vielen Dank für Ihre Hilfe

    robertogozzi thanked this post
    #247784 quote
    Razz
    Participant
    Master

    Hallo  Iván und  robertogozzi 

    Ich benutze den Indikator wirklich sehr gerne , was muss Ich tun um eine Handelsbox von 22:00 bis 08:00 zu erhalten das geht aktuell wohl noch nicht oder ?

    Viele Grüßen

    #247785 quote
    larouedegann
    Participant
    Master
    #247788 quote
    Razz
    Participant
    Master

    Ich möchte eine Box von 22:00 des Vortages bis um 8:00 des heutigen Tages

    Boxen innerhalb eines Tages sind ja kein Problem

    #247796 quote
    robertogozzi
    Moderator
    Master

    Da ist er:

    //----------------------------------------------//
    //PRC_ICT Killzones and Pivots
    //version = 0
    //10.10.2024
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //----------------------------------------------//
    //-----INPUTS-----------------------------------//
    //----------------------------------------------//
    //openAS=020000
    //closeAS=060000
    //openLO=080000
    //closeLO=110000
    //openNYam=153000
    //closeNYam=170000
    //openNYlch=180000
    //closeNYlch=190000
    //openNYpm=193000
    //closeNYpm=220000
    //ShowNylch=1
    //ShowMidLine=1
    openNY=openNYam
    closeNY=closeNYpm
    limitday=180000
    openTrueDay=060000
    BOXstart = 220000
    BOXend  = 080000
    
    if gettimeframe<=3600 then
    //----------------------------------------------//
    //-------- NIGHT Box --------------------//
    //----------------------------------------------//
    ONCE BOXmax      = high
    ONCE BOXmin       = low
    ONCE BOXStartBar = BarIndex
    ONCE BOXEndBar  = BarIndex
    IF (OpenTime >= BOXstart) OR  (OpenTime <= BOXend) THEN
    IF (OpenTime = BOXstart) THEN
    BOXmax      = high
    BOXmin       = low
    BOXStartBar = BarIndex
    ENDIF
    BOXmax       = max(BOXmax,high)
    BOXmin        = min(BOXmin,low)
    BOXEndBar  = BarIndex
    IF (OpenTime = BOXend) THEN
    DrawRectangle(BOXStartBar,BOXmax ,BOXEndBar,BOXmin)  style(DottedLine,4) coloured("CadetBlue") FillColor("CadetBlue",50)
    ENDIF
    ENDIF
    //----------------------------------------------//
    //-----ASIA Zone--------------------------------//
    //----------------------------------------------//
    once maxHighAS=high
    once minLowAS=low
    if opentime>=openAS and opentime<=closeAS then
    barAS=barAS+1
    if high>=maxHighAS then
    maxHighAS=high
    else
    maxHighAS=maxHighAS
    endif
    if low<=minLowAS then
    minLowAS=low
    else
    minLowAS=minLowAS
    endif
    endif
    if opentime=closeAS then
    drawrectangle(barindex[barAS],minLowAS,barindex,maxHighAS)coloured("blue")fillcolor("blue",30)
    IF ShowMidLine THEN
    MidRange = (maxHighAS - minLowAS) / 2
    MidPrice = minLowAS + MidRange
    drawsegment(barindex[barAS],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("AS.H: #maxHighAS#",barindex[round(barAS/2)],maxHighAS+0.3*tr)
    drawtext("AS.L: #minLowAS#",barindex[round(barAS/2)],minLowAS-0.3*tr)
    prevLowAS=minLowAS
    prevHighAS=maxHighAS
    previdxAS=barindex
    barAS=0
    minLowAS=high*100
    maxHighAS=0
    endif
    if low crosses under prevLowAS then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    prevLowAS=0
    elsif opentime=limitday and prevLowAS<>0 then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    prevLowAS=0
    elsif islastbarupdate and prevLowAS<>0 then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    endif
    if high crosses over prevHighAS then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    prevHighAS=0
    elsif opentime=limitday and prevHighAS<>0 then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    prevHighAS=0
    elsif islastbarupdate and prevHighAS<>0 then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    endif
    //----------------------------------------------//
    //-----London Zone------------------------------//
    //----------------------------------------------//
    once maxHighLO=high
    once minLowLO=low
    if opentime>=openLO and opentime<=closeLO then
    barLO=barLO+1
    if high>=maxHighLO then
    maxHighLO=high
    else
    maxHighLO=maxHighLO
    endif
    if low<=minLowLO then
    minLowLO=low
    else
    minLowLO=minLowLO
    endif
    endif
    if opentime=closeLO then
    drawrectangle(barindex[barLO],minLowLO,barindex,maxHighLO)coloured("red")fillcolor("red",30)
    IF ShowMidLine THEN
    MidRange = (maxHighLO - minLowLO) / 2
    MidPrice = minLowLO + MidRange
    drawsegment(barindex[barLO],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("LO.H: #maxHighLO#",barindex[round(barLO/2)],maxHighLO+0.3*tr)
    drawtext("LO.L: #minLowLO#",barindex[round(barLO/2)],minLowLO-0.3*tr)
    prevLowLO=minLowLO
    prevHighLO=maxHighLO
    previdxLO=barindex
    barLO=0
    minLowLO=high*100
    maxHighLO=0
    endif
    if low crosses under prevLowLO then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    prevLowLO=0
    elsif opentime=limitday and prevLowLO<>0 then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    prevLowLO=0
    elsif islastbarupdate and prevLowLO<>0 then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    endif
    if high crosses over prevHighLO then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    prevHighLO=0
    elsif opentime=limitday and prevHighLO<>0 then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    prevHighLO=0
    elsif islastbarupdate and prevHighLO<>0 then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    endif
    if ShowNylch then
    //----------------------------------------------//
    //-----New York AM------------------------------//
    //----------------------------------------------//
    once maxHighNYam=high
    once minLowNYam=low
    if opentime>=openNYam and opentime<=closeNYam then
    barNYam=barNYam+1
    if high>=maxHighNYam then
    maxHighNYam=high
    else
    maxHighNYam=maxHighNYam
    endif
    if low<=minLowNYam then
    minLowNYam=low
    else
    minLowNYam=minLowNYam
    endif
    endif
    if opentime=closeNYam then
    drawrectangle(barindex[barNYam],minLowNYam,barindex,maxHighNYam)coloured("green")fillcolor("green",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYam - minLowNYam) / 2
    MidPrice = minLowNYam + MidRange
    drawsegment(barindex[barNYam],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("NYam.H: #maxHighNYam#",barindex[round(barNYam/2)],maxHighNYam+0.3*tr)
    drawtext("NYam.L: #minLowNYam#",barindex[round(barNYam/2)],minLowNYam-0.3*tr)
    prevLowNYam=minLowNYam
    prevHighNYam=maxHighNYam
    previdxNYam=barindex
    barNYam=0
    minLowNYam=high*100
    maxHighNYam=0
    endif
    if low crosses under prevLowNYam then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    prevLowNYam=0
    elsif opentime=limitday and prevLowNYam<>0 then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    prevLowNYam=0
    elsif islastbarupdate and prevLowNYam<>0 then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    endif
    if high crosses over prevHighNYam then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    prevHighNYam=0
    elsif opentime=limitday and prevHighNYam<>0 then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    prevHighNYam=0
    elsif islastbarupdate and prevHighNYam<>0 then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    endif
    //----------------------------------------------//
    //-----New York lunch Zone----------------------//
    //----------------------------------------------//
    once maxHighNYlch=high
    once minLowNYlch=low
    if opentime>=openNYlch and opentime<=closeNYlch then
    barNYlch=barNYlch+1
    if high>=maxHighNYlch then
    maxHighNYlch=high
    else
    maxHighNYlch=maxHighNYlch
    endif
    if low<=minLowNYlch then
    minLowNYlch=low
    else
    minLowNYlch=minLowNYlch
    endif
    endif
    if opentime=closeNYlch then
    drawrectangle(barindex[barNYlch],minLowNYlch,barindex,maxHighNYlch)coloured("yellow")fillcolor("yellow",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYlch - minLowNYlch) / 2
    MidPrice = minLowNYlch + MidRange
    drawsegment(barindex[barNYlch],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    prevLowNYlch=minLowNYlch
    prevHighNYlch=maxHighNYlch
    previdxNYlch=barindex
    barNYlch=0
    minLowNYlch=high*100
    maxHighNYlch=0
    endif
    //----------------------------------------------//
    //-----New York PM -----------------------------//
    //----------------------------------------------//
    once maxHighNYpm=high
    once minLowNYpm=low
    if opentime>=openNYpm and opentime<=closeNYpm then
    barNYpm=barNYpm+1
    if high>=maxHighNYpm then
    maxHighNYpm=high
    else
    maxHighNYpm=maxHighNYpm
    endif
    if low<=minLowNYpm then
    minLowNYpm=low
    else
    minLowNYpm=minLowNYpm
    endif
    endif
    if opentime=closeNYpm then
    drawrectangle(barindex[barNYpm],minLowNYpm,barindex,maxHighNYpm)coloured("purple")fillcolor("purple",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYpm - minLowNYpm) / 2
    MidPrice = minLowNYpm + MidRange
    ENDIF
    drawsegment(barindex[barNYpm],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    drawtext("NYpm.H: #maxHighNYpm#",barindex[round(barNYpm/2)],maxHighNYpm+0.3*tr)
    drawtext("NYpm.L: #minLowNYpm#",barindex[round(barNYpm/2)],minLowNYpm-0.3*tr)
    prevLowNYpm=minLowNYpm
    prevHighNYpm=maxHighNYpm
    previdxNYpm=barindex
    barNYpm=0
    minLowNYpm=high*100
    maxHighNYpm=0
    endif
    if low crosses under prevLowNYpm then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    prevLowNYpm=0
    elsif opentime=limitday and prevLowNYpm<>0 then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    prevLowNYpm=0
    elsif islastbarupdate and prevLowNYpm<>0 then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    endif
    if high crosses over prevHighNYpm then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    prevHighNYpm=0
    elsif opentime=limitday and prevHighNYpm<>0 then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    prevHighNYpm=0
    elsif islastbarupdate and prevHighNYpm<>0 then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    endif
    else
    once maxHighNY=high
    once minLowNY=low
    if opentime>=openNY and opentime<=closeNY then
    barNY=barNY+1
    if high>=maxHighNY then
    maxHighNY=high
    else
    maxHighNY=maxHighNY
    endif
    if low<=minLowNY then
    minLowNY=low
    else
    minLowNY=minLowNY
    endif
    endif
    if opentime=closeNY then
    drawrectangle(barindex[barNY],minLowNY,barindex,maxHighNY)coloured("purple")fillcolor("purple",30)
    drawtext("NY.H: #maxHighNY#",barindex[round(barNY/2)],maxHighNY+0.3*tr)
    drawtext("NY.L: #minLowNY#",barindex[round(barNY/2)],minLowNY-0.3*tr)
    prevLowNY=minLowNY
    prevHighNY=maxHighNY
    previdxNY=barindex
    barNY=0
    minLowNY=high*100
    maxHighNY=0
    endif
    if low crosses under prevLowNY then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    prevLowNY=0
    elsif opentime=limitday and prevLowNY<>0 then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    prevLowNY=0
    elsif islastbarupdate and prevLowNY<>0 then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    endif
    if high crosses over prevHighNY then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    prevHighNY=0
    elsif opentime=limitday and prevHighNY<>0 then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    prevHighNY=0
    elsif islastbarupdate and prevHighNY<>0 then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    endif
    endif
    //----------------------------------------------//
    //-----Limit Day--------------------------------//
    //----------------------------------------------//
    if opentime=openTrueDay then
    openTD=open
    barTD=barindex
    else
    if opentime=limitday then
    drawvline(barindex)style(dottedline)
    drawsegment(barTD,openTD,barindex,openTD)style(dottedline1)
    endif
    endif
    else
    drawtext("Change timeframe to 1hr or less",0,0,SansSerif,bold,34)anchor(middle,xshift,yshift)
    endif
    return
    #247807 quote
    Razz
    Participant
    Master

    Hallo  robertogozzi vielen Dank sowas ähnliches nutze Ich jetzt auch schon.

    Muss mal schauen will das eigentlich so wie die anderen Boxen auch haben (Name/High/Low) und das High und Low enden wenn sie Berührt werden wie die anderen Boxen auch .

    Viele Grüße

    Peter

    #247841 quote
    robertogozzi
    Moderator
    Master

    Da ist er:

    //----------------------------------------------//
    //PRC_ICT Killzones and Pivots
    //version = 0
    //10.10.2024
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //----------------------------------------------//
    //-----INPUTS-----------------------------------//
    //----------------------------------------------//
    //openAS=020000
    //closeAS=060000
    //openLO=080000
    //closeLO=110000
    //openNYam=153000
    //closeNYam=170000
    //openNYlch=180000
    //closeNYlch=190000
    //openNYpm=193000
    //closeNYpm=220000
    //ShowNylch=1
    //ShowMidLine=1
    openNY=openNYam
    closeNY=closeNYpm
    limitday=180000
    openTrueDay=060000
    BOXstart = 220000
    BOXend  = 080000
    
    if gettimeframe<=3600 then
    //----------------------------------------------//
    //-------- NIGHT Box --------------------//
    //----------------------------------------------//
    IF ShowNight THEN
    ONCE BOXmax      = high
    ONCE BOXmin       = low
    ONCE prevBOXlow  = low
    ONCE prevBOXhigh = high
    ONCE BOXStartBar = BarIndex
    ONCE BOXEndBar  = BarIndex
    IF (OpenTime >= BOXstart) OR  (OpenTime <= BOXend) THEN
    IF (OpenTime = BOXstart) THEN
    BOXmax       = high
    BOXmin        = low
    BOXStartBar = BarIndex
    ENDIF
    BOXmax       = max(BOXmax,high)
    BOXmin        = min(BOXmin,low)
    BOXEndBar  = BarIndex
    IF (OpenTime = BOXend) THEN
    prevBOXmin  = BOXmin
    prevBOXmax = BOXmax
    DrawRectangle(BOXStartBar,prevBOXmax ,BOXEndBar,prevBOXmin)  style(DottedLine,1) coloured("CadetBlue") FillColor("CadetBlue",50)
    IF ShowMidLine THEN
    MidRange = (prevBOXmax - prevBOXmin) / 2
    MidPrice = prevBOXmin + MidRange
    drawsegment(BOXStartBar,MidPrice,BOXEndBar,MidPrice)coloured("Gold") style(dottedline,4)
    ENDIF
    prevBOXEndBar = BOXEndBar
    ENDIF
    ENDIF
    if low crosses under prevBOXmin then
    drawsegment(prevBOXEndBar,prevBOXmin,barindex,prevBOXmin)coloured("CadetBlue")
    prevBOXmin=0
    elsif opentime=limitday and prevBOXmin<>0 then
    drawsegment(prevBOXEndBar,prevBOXmin,barindex,prevBOXmin)coloured("CadetBlue")
    prevBOXmin=0
    elsif islastbarupdate and prevBOXmin<>0 then
    drawsegment(prevBOXEndBar,prevBOXmin,barindex,prevBOXmin)coloured("CadetBlue")
    endif
    if high crosses over prevBOXmax then
    drawsegment(prevBOXEndBar,prevBOXmax,barindex,prevBOXmax)coloured("CadetBlue")
    prevHighLO=0
    elsif opentime=limitday and prevBOXmax<>0 then
    drawsegment(prevBOXEndBar,prevBOXmax,barindex,prevBOXmax)coloured("CadetBlue")
    prevHighLO=0
    elsif islastbarupdate and prevBOXmax<>0 then
    drawsegment(prevBOXEndBar,prevBOXmax,barindex,prevBOXmax)coloured("CadetBlue")
    endif
    ENDIF
    //----------------------------------------------//
    //-----ASIA Zone--------------------------------//
    //----------------------------------------------//
    once maxHighAS=high
    once minLowAS=low
    if opentime>=openAS and opentime<=closeAS then
    barAS=barAS+1
    if high>=maxHighAS then
    maxHighAS=high
    else
    maxHighAS=maxHighAS
    endif
    if low<=minLowAS then
    minLowAS=low
    else
    minLowAS=minLowAS
    endif
    endif
    if opentime=closeAS then
    drawrectangle(barindex[barAS],minLowAS,barindex,maxHighAS)coloured("blue")fillcolor("blue",30)
    IF ShowMidLine THEN
    MidRange = (maxHighAS - minLowAS) / 2
    MidPrice = minLowAS + MidRange
    drawsegment(barindex[barAS],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("AS.H: #maxHighAS#",barindex[round(barAS/2)],maxHighAS+0.3*tr)
    drawtext("AS.L: #minLowAS#",barindex[round(barAS/2)],minLowAS-0.3*tr)
    prevLowAS=minLowAS
    prevHighAS=maxHighAS
    previdxAS=barindex
    barAS=0
    minLowAS=high*100
    maxHighAS=0
    endif
    if low crosses under prevLowAS then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    prevLowAS=0
    elsif opentime=limitday and prevLowAS<>0 then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    prevLowAS=0
    elsif islastbarupdate and prevLowAS<>0 then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    endif
    if high crosses over prevHighAS then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    prevHighAS=0
    elsif opentime=limitday and prevHighAS<>0 then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    prevHighAS=0
    elsif islastbarupdate and prevHighAS<>0 then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    endif
    //----------------------------------------------//
    //-----London Zone------------------------------//
    //----------------------------------------------//
    once maxHighLO=high
    once minLowLO=low
    if opentime>=openLO and opentime<=closeLO then
    barLO=barLO+1
    if high>=maxHighLO then
    maxHighLO=high
    else
    maxHighLO=maxHighLO
    endif
    if low<=minLowLO then
    minLowLO=low
    else
    minLowLO=minLowLO
    endif
    endif
    if opentime=closeLO then
    drawrectangle(barindex[barLO],minLowLO,barindex,maxHighLO)coloured("red")fillcolor("red",30)
    IF ShowMidLine THEN
    MidRange = (maxHighLO - minLowLO) / 2
    MidPrice = minLowLO + MidRange
    drawsegment(barindex[barLO],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("LO.H: #maxHighLO#",barindex[round(barLO/2)],maxHighLO+0.3*tr)
    drawtext("LO.L: #minLowLO#",barindex[round(barLO/2)],minLowLO-0.3*tr)
    prevLowLO=minLowLO
    prevHighLO=maxHighLO
    previdxLO=barindex
    barLO=0
    minLowLO=high*100
    maxHighLO=0
    endif
    if low crosses under prevLowLO then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    prevLowLO=0
    elsif opentime=limitday and prevLowLO<>0 then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    prevLowLO=0
    elsif islastbarupdate and prevLowLO<>0 then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    endif
    if high crosses over prevHighLO then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    prevHighLO=0
    elsif opentime=limitday and prevHighLO<>0 then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    prevHighLO=0
    elsif islastbarupdate and prevHighLO<>0 then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    endif
    if ShowNylch then
    //----------------------------------------------//
    //-----New York AM------------------------------//
    //----------------------------------------------//
    once maxHighNYam=high
    once minLowNYam=low
    if opentime>=openNYam and opentime<=closeNYam then
    barNYam=barNYam+1
    if high>=maxHighNYam then
    maxHighNYam=high
    else
    maxHighNYam=maxHighNYam
    endif
    if low<=minLowNYam then
    minLowNYam=low
    else
    minLowNYam=minLowNYam
    endif
    endif
    if opentime=closeNYam then
    drawrectangle(barindex[barNYam],minLowNYam,barindex,maxHighNYam)coloured("green")fillcolor("green",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYam - minLowNYam) / 2
    MidPrice = minLowNYam + MidRange
    drawsegment(barindex[barNYam],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("NYam.H: #maxHighNYam#",barindex[round(barNYam/2)],maxHighNYam+0.3*tr)
    drawtext("NYam.L: #minLowNYam#",barindex[round(barNYam/2)],minLowNYam-0.3*tr)
    prevLowNYam=minLowNYam
    prevHighNYam=maxHighNYam
    previdxNYam=barindex
    barNYam=0
    minLowNYam=high*100
    maxHighNYam=0
    endif
    if low crosses under prevLowNYam then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    prevLowNYam=0
    elsif opentime=limitday and prevLowNYam<>0 then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    prevLowNYam=0
    elsif islastbarupdate and prevLowNYam<>0 then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    endif
    if high crosses over prevHighNYam then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    prevHighNYam=0
    elsif opentime=limitday and prevHighNYam<>0 then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    prevHighNYam=0
    elsif islastbarupdate and prevHighNYam<>0 then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    endif
    //----------------------------------------------//
    //-----New York lunch Zone----------------------//
    //----------------------------------------------//
    once maxHighNYlch=high
    once minLowNYlch=low
    if opentime>=openNYlch and opentime<=closeNYlch then
    barNYlch=barNYlch+1
    if high>=maxHighNYlch then
    maxHighNYlch=high
    else
    maxHighNYlch=maxHighNYlch
    endif
    if low<=minLowNYlch then
    minLowNYlch=low
    else
    minLowNYlch=minLowNYlch
    endif
    endif
    if opentime=closeNYlch then
    drawrectangle(barindex[barNYlch],minLowNYlch,barindex,maxHighNYlch)coloured("yellow")fillcolor("yellow",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYlch - minLowNYlch) / 2
    MidPrice = minLowNYlch + MidRange
    drawsegment(barindex[barNYlch],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    prevLowNYlch=minLowNYlch
    prevHighNYlch=maxHighNYlch
    previdxNYlch=barindex
    barNYlch=0
    minLowNYlch=high*100
    maxHighNYlch=0
    endif
    //----------------------------------------------//
    //-----New York PM -----------------------------//
    //----------------------------------------------//
    once maxHighNYpm=high
    once minLowNYpm=low
    if opentime>=openNYpm and opentime<=closeNYpm then
    barNYpm=barNYpm+1
    if high>=maxHighNYpm then
    maxHighNYpm=high
    else
    maxHighNYpm=maxHighNYpm
    endif
    if low<=minLowNYpm then
    minLowNYpm=low
    else
    minLowNYpm=minLowNYpm
    endif
    endif
    if opentime=closeNYpm then
    drawrectangle(barindex[barNYpm],minLowNYpm,barindex,maxHighNYpm)coloured("purple")fillcolor("purple",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYpm - minLowNYpm) / 2
    MidPrice = minLowNYpm + MidRange
    ENDIF
    drawsegment(barindex[barNYpm],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    drawtext("NYpm.H: #maxHighNYpm#",barindex[round(barNYpm/2)],maxHighNYpm+0.3*tr)
    drawtext("NYpm.L: #minLowNYpm#",barindex[round(barNYpm/2)],minLowNYpm-0.3*tr)
    prevLowNYpm=minLowNYpm
    prevHighNYpm=maxHighNYpm
    previdxNYpm=barindex
    barNYpm=0
    minLowNYpm=high*100
    maxHighNYpm=0
    endif
    if low crosses under prevLowNYpm then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    prevLowNYpm=0
    elsif opentime=limitday and prevLowNYpm<>0 then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    prevLowNYpm=0
    elsif islastbarupdate and prevLowNYpm<>0 then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    endif
    if high crosses over prevHighNYpm then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    prevHighNYpm=0
    elsif opentime=limitday and prevHighNYpm<>0 then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    prevHighNYpm=0
    elsif islastbarupdate and prevHighNYpm<>0 then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    endif
    else
    once maxHighNY=high
    once minLowNY=low
    if opentime>=openNY and opentime<=closeNY then
    barNY=barNY+1
    if high>=maxHighNY then
    maxHighNY=high
    else
    maxHighNY=maxHighNY
    endif
    if low<=minLowNY then
    minLowNY=low
    else
    minLowNY=minLowNY
    endif
    endif
    if opentime=closeNY then
    drawrectangle(barindex[barNY],minLowNY,barindex,maxHighNY)coloured("purple")fillcolor("purple",30)
    drawtext("NY.H: #maxHighNY#",barindex[round(barNY/2)],maxHighNY+0.3*tr)
    drawtext("NY.L: #minLowNY#",barindex[round(barNY/2)],minLowNY-0.3*tr)
    prevLowNY=minLowNY
    prevHighNY=maxHighNY
    previdxNY=barindex
    barNY=0
    minLowNY=high*100
    maxHighNY=0
    endif
    if low crosses under prevLowNY then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    prevLowNY=0
    elsif opentime=limitday and prevLowNY<>0 then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    prevLowNY=0
    elsif islastbarupdate and prevLowNY<>0 then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    endif
    if high crosses over prevHighNY then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    prevHighNY=0
    elsif opentime=limitday and prevHighNY<>0 then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    prevHighNY=0
    elsif islastbarupdate and prevHighNY<>0 then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    endif
    endif
    //----------------------------------------------//
    //-----Limit Day--------------------------------//
    //----------------------------------------------//
    if opentime=openTrueDay then
    openTD=open
    barTD=barindex
    else
    if opentime=limitday then
    drawvline(barindex)style(dottedline)
    drawsegment(barTD,openTD,barindex,openTD)style(dottedline1)
    endif
    endif
    else
    drawtext("Change timeframe to 1hr or less",0,0,SansSerif,bold,34)anchor(middle,xshift,yshift)
    endif
    return
    Razz thanked this post
    #247843 quote
    Razz
    Participant
    Master

    Vielen Lieben Dank robertogozzi für Ihre Tolle Arbeit 😉

    Wäre es zuviel verlangt wenn sie mir noch die Beschriftung und High und Low hinzufügen könnten für die Nachtbox.

    Das wäre echt super

    #247872 quote
    Razz
    Participant
    Master

    Ich habe es mal probiert aber Ich bekomme die Beschriftung mit den Werten für die Nachtbox nicht hin.

    Was Ich festgestellt habe die High und Low Linien werden auch nicht immer beendet siehe Beispiel grüner Haken richtig rotes Kreuz hat nicht geklappt.

    Vielleicht können Sie ja nochmal nachschauen wenn Sie Zeit haben .

    #247890 quote
    robertogozzi
    Moderator
    Master

    Wann sollen die Zeilen enden?
    Was soll als Text geschrieben werden?

    #247902 quote
    Razz
    Participant
    Master

    Hallo robertogozzi

    Als Text reicht mir die Werte des Tiefs und Hochs der Nachtbox unter bzw. über der Box wie sonst auch .

    Das mit den Linie Hoch oder Tief  ist denke Ich ein Fehler vom Indikator bzw. ProRealtime  generell den es funktioniert ja auch oft das die Linien für Hoch oder Tief enden  wenn sie über bzw. unterschritten werden .

    Das ist ja wie bei den anderen Boxen des Indikators da geht es manchmal auch nicht und sie werden weiter gezeichnet.

    habe nochmal ein Beispiel Bild angehängt (zur besseren Übersicht zeigt der Indikator nur die Nachtbox), hoffe es ist verständlich.

    Vielen Dank

    #247921 quote
    robertogozzi
    Moderator
    Master

    Ich habe die Variable „ShowExtensions“ hinzugefügt (siehe beigefügtes Foto). Sie können diese Erweiterungen aktivieren oder deaktivieren, um die Anzeige zu aktivieren oder zu deaktivieren.

    Diese Erweiterungen werden nach Handelsschluss der jeweiligen Zeitzone ausgegeben, wenn das Hoch oder Tief unterschritten wird (d. h. der Preis unter- oder überschreitet).

    Dies ist der aktualisierte Code:

    //----------------------------------------------//
    //PRC_ICT Killzones and Pivots
    //version = 0
    //10.10.2024
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //----------------------------------------------//
    //-----INPUTS-----------------------------------//
    //----------------------------------------------//
    //openAS=020000
    //closeAS=060000
    //openLO=080000
    //closeLO=110000
    //openNYam=153000
    //closeNYam=170000
    //openNYlch=180000
    //closeNYlch=190000
    //openNYpm=193000
    //closeNYpm=220000
    //ShowNylch=1
    //ShowMidLine=1
    //ShowNight=1
    //ShowExtensions=1
    openNY=openNYam
    closeNY=closeNYpm
    limitday=180000
    openTrueDay=060000
    BOXstart = 220000
    BOXend  = 080000
    
    if gettimeframe<=3600 then
    //----------------------------------------------//
    //-------- NIGHT Box --------------------//
    //----------------------------------------------//
    IF ShowNight THEN
    ONCE BOXmax      = high
    ONCE BOXmin       = low
    ONCE prevBOXlow  = low
    ONCE prevBOXhigh = high
    ONCE BOXStartBar = BarIndex
    ONCE BOXEndBar  = BarIndex
    IF (OpenTime >= BOXstart) OR  (OpenTime <= BOXend) THEN
    IF (OpenTime = BOXstart) THEN
    BOXmax       = high
    BOXmin        = low
    BOXStartBar = BarIndex
    ENDIF
    BOXmax       = max(BOXmax,high)
    BOXmin        = min(BOXmin,low)
    BOXEndBar  = BarIndex
    IF (OpenTime = BOXend) THEN
    prevBOXmin  = BOXmin
    prevBOXmax = BOXmax
    DrawRectangle(BOXStartBar,prevBOXmax ,BOXEndBar,prevBOXmin)  style(DottedLine,1) coloured("CadetBlue") FillColor("CadetBlue",50)
    IF ShowMidLine THEN
    MidRange = (prevBOXmax - prevBOXmin) / 2
    MidPrice = prevBOXmin + MidRange
    drawsegment(BOXStartBar,MidPrice,BOXEndBar,MidPrice)coloured("Gold") style(dottedline,4)
    ENDIF
    drawtext("(Night) H:#prevBOXmax# L:#prevBOXmin#",BOXStartBar+4,prevBOXmax+0.3*tr)
    prevBOXEndBar = BOXEndBar
    ENDIF
    ENDIF
    IF ShowExtensions THEN
    if low crosses under prevBOXmin then
    drawsegment(prevBOXEndBar,prevBOXmin,barindex,prevBOXmin)coloured("CadetBlue")
    prevBOXmin=0
    elsif opentime=limitday and prevBOXmin<>0 then
    drawsegment(prevBOXEndBar,prevBOXmin,barindex,prevBOXmin)coloured("CadetBlue")
    prevBOXmin=0
    elsif islastbarupdate and prevBOXmin<>0 then
    drawsegment(prevBOXEndBar,prevBOXmin,barindex,prevBOXmin)coloured("CadetBlue")
    endif
    if high crosses over prevBOXmax then
    drawsegment(prevBOXEndBar,prevBOXmax,barindex,prevBOXmax)coloured("CadetBlue")
    prevHighLO=0
    elsif opentime=limitday and prevBOXmax<>0 then
    drawsegment(prevBOXEndBar,prevBOXmax,barindex,prevBOXmax)coloured("CadetBlue")
    prevHighLO=0
    elsif islastbarupdate and prevBOXmax<>0 then
    drawsegment(prevBOXEndBar,prevBOXmax,barindex,prevBOXmax)coloured("CadetBlue")
    endif
    ENDIF
    ENDIF
    //----------------------------------------------//
    //-----ASIA Zone--------------------------------//
    //----------------------------------------------//
    once maxHighAS=high
    once minLowAS=low
    if opentime>=openAS and opentime<=closeAS then
    barAS=barAS+1
    if high>=maxHighAS then
    maxHighAS=high
    else
    maxHighAS=maxHighAS
    endif
    if low<=minLowAS then
    minLowAS=low
    else
    minLowAS=minLowAS
    endif
    endif
    if opentime=closeAS then
    drawrectangle(barindex[barAS],minLowAS,barindex,maxHighAS)coloured("blue")fillcolor("blue",30)
    IF ShowMidLine THEN
    MidRange = (maxHighAS - minLowAS) / 2
    MidPrice = minLowAS + MidRange
    drawsegment(barindex[barAS],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("AS.H: #maxHighAS#",barindex[round(barAS/2)],maxHighAS+0.3*tr)
    drawtext("AS.L: #minLowAS#",barindex[round(barAS/2)],minLowAS-0.3*tr)
    prevLowAS=minLowAS
    prevHighAS=maxHighAS
    previdxAS=barindex
    barAS=0
    minLowAS=high*100
    maxHighAS=0
    endif
    IF ShowExtensions THEN
    if low crosses under prevLowAS then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    prevLowAS=0
    elsif opentime=limitday and prevLowAS<>0 then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    prevLowAS=0
    elsif islastbarupdate and prevLowAS<>0 then
    drawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")
    endif
    if high crosses over prevHighAS then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    prevHighAS=0
    elsif opentime=limitday and prevHighAS<>0 then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    prevHighAS=0
    elsif islastbarupdate and prevHighAS<>0 then
    drawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")
    endif
    endif
    //----------------------------------------------//
    //-----London Zone------------------------------//
    //----------------------------------------------//
    once maxHighLO=high
    once minLowLO=low
    if opentime>=openLO and opentime<=closeLO then
    barLO=barLO+1
    if high>=maxHighLO then
    maxHighLO=high
    else
    maxHighLO=maxHighLO
    endif
    if low<=minLowLO then
    minLowLO=low
    else
    minLowLO=minLowLO
    endif
    endif
    if opentime=closeLO then
    drawrectangle(barindex[barLO],minLowLO,barindex,maxHighLO)coloured("red")fillcolor("red",30)
    IF ShowMidLine THEN
    MidRange = (maxHighLO - minLowLO) / 2
    MidPrice = minLowLO + MidRange
    drawsegment(barindex[barLO],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("LO.H: #maxHighLO#",barindex[round(barLO/2)],maxHighLO+0.3*tr)
    drawtext("LO.L: #minLowLO#",barindex[round(barLO/2)],minLowLO-0.3*tr)
    prevLowLO=minLowLO
    prevHighLO=maxHighLO
    previdxLO=barindex
    barLO=0
    minLowLO=high*100
    maxHighLO=0
    endif
    IF ShowExtensions THEN
    if low crosses under prevLowLO then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    prevLowLO=0
    elsif opentime=limitday and prevLowLO<>0 then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    prevLowLO=0
    elsif islastbarupdate and prevLowLO<>0 then
    drawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")
    endif
    if high crosses over prevHighLO then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    prevHighLO=0
    elsif opentime=limitday and prevHighLO<>0 then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    prevHighLO=0
    elsif islastbarupdate and prevHighLO<>0 then
    drawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")
    endif
    endif
    if ShowNylch then
    //----------------------------------------------//
    //-----New York AM------------------------------//
    //----------------------------------------------//
    once maxHighNYam=high
    once minLowNYam=low
    if opentime>=openNYam and opentime<=closeNYam then
    barNYam=barNYam+1
    if high>=maxHighNYam then
    maxHighNYam=high
    else
    maxHighNYam=maxHighNYam
    endif
    if low<=minLowNYam then
    minLowNYam=low
    else
    minLowNYam=minLowNYam
    endif
    endif
    if opentime=closeNYam then
    drawrectangle(barindex[barNYam],minLowNYam,barindex,maxHighNYam)coloured("green")fillcolor("green",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYam - minLowNYam) / 2
    MidPrice = minLowNYam + MidRange
    drawsegment(barindex[barNYam],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    drawtext("NYam.H: #maxHighNYam#",barindex[round(barNYam/2)],maxHighNYam+0.3*tr)
    drawtext("NYam.L: #minLowNYam#",barindex[round(barNYam/2)],minLowNYam-0.3*tr)
    prevLowNYam=minLowNYam
    prevHighNYam=maxHighNYam
    previdxNYam=barindex
    barNYam=0
    minLowNYam=high*100
    maxHighNYam=0
    endif
    IF ShowExtensions THEN
    if low crosses under prevLowNYam then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    prevLowNYam=0
    elsif opentime=limitday and prevLowNYam<>0 then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    prevLowNYam=0
    elsif islastbarupdate and prevLowNYam<>0 then
    drawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")
    endif
    if high crosses over prevHighNYam then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    prevHighNYam=0
    elsif opentime=limitday and prevHighNYam<>0 then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    prevHighNYam=0
    elsif islastbarupdate and prevHighNYam<>0 then
    drawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")
    endif
    endif
    //----------------------------------------------//
    //-----New York lunch Zone----------------------//
    //----------------------------------------------//
    once maxHighNYlch=high
    once minLowNYlch=low
    if opentime>=openNYlch and opentime<=closeNYlch then
    barNYlch=barNYlch+1
    if high>=maxHighNYlch then
    maxHighNYlch=high
    else
    maxHighNYlch=maxHighNYlch
    endif
    if low<=minLowNYlch then
    minLowNYlch=low
    else
    minLowNYlch=minLowNYlch
    endif
    endif
    if opentime=closeNYlch then
    drawrectangle(barindex[barNYlch],minLowNYlch,barindex,maxHighNYlch)coloured("yellow")fillcolor("yellow",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYlch - minLowNYlch) / 2
    MidPrice = minLowNYlch + MidRange
    drawsegment(barindex[barNYlch],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    ENDIF
    prevLowNYlch=minLowNYlch
    prevHighNYlch=maxHighNYlch
    previdxNYlch=barindex
    barNYlch=0
    minLowNYlch=high*100
    maxHighNYlch=0
    endif
    //----------------------------------------------//
    //-----New York PM -----------------------------//
    //----------------------------------------------//
    once maxHighNYpm=high
    once minLowNYpm=low
    if opentime>=openNYpm and opentime<=closeNYpm then
    barNYpm=barNYpm+1
    if high>=maxHighNYpm then
    maxHighNYpm=high
    else
    maxHighNYpm=maxHighNYpm
    endif
    if low<=minLowNYpm then
    minLowNYpm=low
    else
    minLowNYpm=minLowNYpm
    endif
    endif
    if opentime=closeNYpm then
    drawrectangle(barindex[barNYpm],minLowNYpm,barindex,maxHighNYpm)coloured("purple")fillcolor("purple",30)
    IF ShowMidLine THEN
    MidRange = (maxHighNYpm - minLowNYpm) / 2
    MidPrice = minLowNYpm + MidRange
    ENDIF
    drawsegment(barindex[barNYpm],MidPrice,barindex,MidPrice)coloured("Cyan") style(dottedline,4)
    drawtext("NYpm.H: #maxHighNYpm#",barindex[round(barNYpm/2)],maxHighNYpm+0.3*tr)
    drawtext("NYpm.L: #minLowNYpm#",barindex[round(barNYpm/2)],minLowNYpm-0.3*tr)
    prevLowNYpm=minLowNYpm
    prevHighNYpm=maxHighNYpm
    previdxNYpm=barindex
    barNYpm=0
    minLowNYpm=high*100
    maxHighNYpm=0
    endif
    IF ShowExtensions THEN
    if low crosses under prevLowNYpm then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    prevLowNYpm=0
    elsif opentime=limitday and prevLowNYpm<>0 then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    prevLowNYpm=0
    elsif islastbarupdate and prevLowNYpm<>0 then
    drawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")
    endif
    if high crosses over prevHighNYpm then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    prevHighNYpm=0
    elsif opentime=limitday and prevHighNYpm<>0 then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    prevHighNYpm=0
    elsif islastbarupdate and prevHighNYpm<>0 then
    drawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")
    endif
    endif
    else
    once maxHighNY=high
    once minLowNY=low
    if opentime>=openNY and opentime<=closeNY then
    barNY=barNY+1
    if high>=maxHighNY then
    maxHighNY=high
    else
    maxHighNY=maxHighNY
    endif
    if low<=minLowNY then
    minLowNY=low
    else
    minLowNY=minLowNY
    endif
    endif
    if opentime=closeNY then
    drawrectangle(barindex[barNY],minLowNY,barindex,maxHighNY)coloured("purple")fillcolor("purple",30)
    drawtext("NY.H: #maxHighNY#",barindex[round(barNY/2)],maxHighNY+0.3*tr)
    drawtext("NY.L: #minLowNY#",barindex[round(barNY/2)],minLowNY-0.3*tr)
    prevLowNY=minLowNY
    prevHighNY=maxHighNY
    previdxNY=barindex
    barNY=0
    minLowNY=high*100
    maxHighNY=0
    endif
    IF ShowExtensions THEN
    if low crosses under prevLowNY then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    prevLowNY=0
    elsif opentime=limitday and prevLowNY<>0 then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    prevLowNY=0
    elsif islastbarupdate and prevLowNY<>0 then
    drawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")
    endif
    if high crosses over prevHighNY then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    prevHighNY=0
    elsif opentime=limitday and prevHighNY<>0 then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    prevHighNY=0
    elsif islastbarupdate and prevHighNY<>0 then
    drawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")
    endif
    endif
    endif
    //----------------------------------------------//
    //-----Limit Day--------------------------------//
    //----------------------------------------------//
    if opentime=openTrueDay then
    openTD=open
    barTD=barindex
    else
    if opentime=limitday then
    drawvline(barindex)style(dottedline)
    drawsegment(barTD,openTD,barindex,openTD)style(dottedline1)
    endif
    endif
    else
    drawtext("Change timeframe to 1hr or less",0,0,SansSerif,bold,34)anchor(middle,xshift,yshift)
    endif
    return
    #247942 quote
    Razz
    Participant
    Master

    Hallo robertogozzi Ich  muss mich nochmals sehr für Ihre Hilfe bedanken !

    1. das mit dem High/Low Wert hat geklappt hab Ich noch etwas angepasst  erledigt 😉
    2. Habe als Indikator nur die Nachtbox genommen wegen der Übersichtlichkeit
    3. Im Bild sieht man gut die Linie unten enden wenn der Kurs die Linie unterschreitet
    4. bei den Linien oben funktioniert das aber nicht
    5. Mit ShowExtensionies blende Ich ja die Linien nur komplett aus das will Ich ja nicht

     

    Vielleicht finden Sie ja noch den Fehler

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.

prc_ict-killzones-and-pivots Mittellinien der Boxen hinzufügen


ProBuilder Support

New Reply
Author
author-avatar
Razz @razz Participant
Summary

This topic contains 18 replies,
has 3 voices, and was last updated by Razz
7 months, 3 weeks ago.

Topic Details
Forum: ProBuilder Support
Language: German
Started: 05/08/2025
Status: Active
Attachments: 10 files
Logo Logo
Loading...