Visualizzazione Pivot Camarllla

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #188684 quote
    MauroPro
    Participant
    Veteran

    Ciao Roberto, ho ripreso da: Library – indicatori,  questa formula di pivot “camarilla” (ho cambiato solo i colori e lo stile).

    Potresti migliorare queste due cose:

    1. visualizzare solo i pivot del giorno corrente ( e rendere invisibili quelli dei giorni passati)
    2. visualizzare per la giornata di  lunedi i valori di venerdi

    Grazie

    Ecco la formula:

    myH = ( DHIGH(1) )
    myL = ( DLOW(1) )
    myC = ( DCLOSE (1) )

    PP = myc//PP = Previous Day’s Close

    R1 = ((myH-myL) * 1.1)/12+myC
    RR2 = ((myH-myL)*1.1)/6+myC // Note: RR2 is used instead of R2 since R2 is the symbol for “R squared” in probuilder language.
    R3 = ((myH-myL)*1.1)/4+myC
    R4 = ((myH-myL)*1.1)/2+myC

    S1 = myC-((myH-myL)*1.1)/12
    S2 = myC-((myH-myL)*1.1)/6
    S3 = myC-((myH-myL)*1.1)/4
    S4 = myC-((myH-myL)*1.1)/2

    RETURN R1 COLOURED(255,0,0)style(dottedLine,2) AS “CAMA R1” , RR2 COLOURED(255,0,0)style(dottedLine,2) AS “CAMA R2” , R3 COLOURED(255,0,0)style(dottedLine,2) AS “CAMA R3”, R4 COLOURED(255,0,0)style(dottedLine,2) AS “CAMA R4” , S1 COLOURED(0,180,0) style(dottedLine,2)AS “CAMA S1”, S2 COLOURED(0,180,0) style(dottedLine,2)AS “CAMA S2” , S3 COLOURED(0,180,0)style(dottedLine,2)AS “CAMA S3” , S4 COLOURED(0,180,0) style(dottedLine,2)AS “CAMA S4” ,PP COLOURED(0,0,0)style(line,2) AS “CAMA PP”

    #188828 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    DEFPARAM DrawOnLastBarOnly = true
    IF IntraDayBarIndex = 0 THEN
    inizio = BarIndex
    ENDIF
    
    myH = ( DHIGH(1) )
    myL = ( DLOW(1) )
    myC = ( DCLOSE (1) )
    
    IF OpenDayOfWeek = 1 THEN
    myH = ( DHIGH(2) )
    myL = ( DLOW(2) )
    myC = ( DCLOSE (2) )
    ENDIF
    
    PP = myc//PP = Previous Day’s Close
    
    R1 = ((myH-myL) * 1.1)/12+myC
    RR2 = ((myH-myL)*1.1)/6+myC // Note: RR2 is used instead of R2 since R2 is the symbol for "R squared" in probuilder language.
    R3 = ((myH-myL)*1.1)/4+myC
    R4 = ((myH-myL)*1.1)/2+myC
    
    S1 = myC-((myH-myL)*1.1)/12
    S2 = myC-((myH-myL)*1.1)/6
    S3 = myC-((myH-myL)*1.1)/4
    S4 = myC-((myH-myL)*1.1)/2
    
    DrawSegment(Inizio,R1,BarIndex,R1)   COLOURED(255,0,0) style(dottedLine,2)
    DrawText("Cama R1", BarIndex+5,R1)   COLOURED(255,0,0)
    DrawSegment(Inizio,RR2,BarIndex,RR2) COLOURED(255,0,0) style(dottedLine,2)
    DrawText("Cama R2",BarIndex+5,RR2)   COLOURED(255,0,0)
    DrawSegment(Inizio,R3,BarIndex,R3)   COLOURED(255,0,0) style(dottedLine,2)
    DrawText("Cama R3",BarIndex+5,R3)    COLOURED(255,0,0)
    DrawSegment(Inizio,R4,BarIndex,R4)   COLOURED(255,0,0) style(dottedLine,2)
    DrawText("Cama R4",BarIndex+5,R4)    COLOURED(255,0,0)
    DrawSegment(Inizio,S1,BarIndex,S1)   COLOURED(0,180,0) style(dottedLine,2)
    DrawText("Cama S1",BarIndex+5,S1)    COLOURED(0,180,0)
    DrawSegment(Inizio,S2,BarIndex,S2)   COLOURED(0,180,0) style(dottedLine,2)
    DrawText("Cama S2",BarIndex+5,S2)    COLOURED(0,180,0)
    DrawSegment(Inizio,S3,BarIndex,S3)   COLOURED(0,180,0) style(dottedLine,2)
    DrawText("Cama S3",BarIndex+5,S3)    COLOURED(0,180,0)
    DrawSegment(Inizio,S4,BarIndex,S4)   COLOURED(0,180,0) style(dottedLine,2)
    DrawText("Cama S4",BarIndex+5,S4)    COLOURED(0,180,0)
    DrawSegment(Inizio,PP,BarIndex,PP)   COLOURED(0,0,0)   style(dottedLine,2)
    DrawText("Cama PP",BarIndex+5,PP)    COLOURED(0,0,0)
    
    RETURN
    //RETURN R1 COLOURED(255,0,0)style(dottedLine,2) AS "CAMA R1" , RR2 COLOURED(255,0,0)style(dottedLine,2) AS "CAMA R2" , R3 COLOURED(255,0,0)style(dottedLine,2) AS "CAMA R3", R4 COLOURED(255,0,0)style(dottedLine,2) AS "CAMA R4" , S1 COLOURED(0,180,0) style(dottedLine,2)AS "CAMA S1", S2 COLOURED(0,180,0) style(dottedLine,2)AS "CAMA S2" , S3 COLOURED(0,180,0)style(dottedLine,2)AS "CAMA S3" , S4 COLOURED(0,180,0) style(dottedLine,2)AS "CAMA S4" ,PP COLOURED(0,0,0)style(line,2) AS "CAMA PP"
    MauroPro thanked this post
    #188842 quote
    MauroPro
    Participant
    Veteran

    Perfetto, grazie Roberto!

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

Visualizzazione Pivot Camarllla


Supporto ProBuilder

New Reply
Author
author-avatar
MauroPro @mauropro Participant
Summary

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

Topic Details
Forum: Supporto ProBuilder
Language: Italian
Started: 02/22/2022
Status: Active
Attachments: 2 files
Logo Logo
Loading...