Modifica ProScreen

Viewing 2 posts - 1 through 2 (of 2 total)
  • #232388

    Salve a tutti, sto provando ad utilizzare uno script scritto da Nicolas ma avrei bisogno di qualche modifica. Ho gia chiesto nel forum ma evidentemente sono occupati.
    Lo script Proscreener individua il pattern Cup WithHandle solo che lo fà su tutte le barre presenti nel grafico. Io vorrei che facesse le seguenti cose:
    1. Individuare il pattern solo sulle ultime 20 barre
    2. Individuare il pattern ancora in formazione (ad esempio con la Cup formata ma ancora senza handle)
    3. che funzioni su tutti i TF

    A occhio dovrebbe essere abbastanza facile da fare per chi conosce molto bene il linguaggio di PRT.

    Allego lo script di Nicolas e attendo fiducioso

    saluti
    //PRC_CupFormations (beta) | screener
    //25.06.2018
    //Nicolas @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge
    //adapted from MetaStock code version

    Parameter = 1.5//Param( “parameter”, 1.5, 1, 10, 0.1 )
    C = close

    FilC = ( log( C ) )

    eps = 0.0000000001
    // basic Definitions
    for i = 1 to barindex do
    if c[i]>c*parameter then
    BarsSincex=barindex-barindex[i]
    break
    endif
    next
    semicupperiod = Max( BarsSincex, 1 ) + 1

    Ptop = highest[Semicupperiod](FilC)
    Pbot = lowest[Semicupperiod](FilC)
    boxheight = abs( Ptop – Pbot ) / 5
    boxlength = Max( round( semicupperiod / 5 ), 1 )

    // Grid Nodes
    bar = max(1,barindex)
    b0 = bar – semicupperiod + 1
    b5 = bar
    b1 = Min( b0 + boxlength, b5 )
    b2 = Min( b1 + boxlength, b5 )
    b3 = Min( b2 + boxlength, b5 )
    b4 = Min( b3 + boxlength, b5 )
    L2 = Pbot + 2 * boxheight
    L3 = Pbot + 3 * boxheight

    // Directional Strength
    Diff = FilC – FilC[1]
    UpSum2 = Summation[2*boxlength]( Max( Diff, 0 ) )
    DnSum2 = Summation[2*boxlength]( Max( -Diff, 0 ) )
    DSX1 = abs( UpSum2 – DnSum2 ) / ( eps + UpSum2 + DnSum2 ) * 100
    UpSum3 = Summation[3*boxlength]( Max( Diff, 0 ) )
    DnSum3 = Summation[3*boxlength]( Max( -Diff, 0 ) )
    DSX2 = abs( UpSum3 – DnSum3 ) / ( eps + UpSum3 + DnSum3 ) * 100

    // Coditions
    if(bar>b2) then
    test1=summation[bar-b2](FilC>L3)=0
    endif
    if(bar>b4) then
    test2=summation[bar-b4](FilC>L2)=0
    endif
    isSemicup = ( semicupperiod >= 20 ) AND ( DSX1[ b5 – b2] > 25 ) AND ( DSX2 < 25 ) AND test1 and test2 LIS = isSemicup screener[LIS]

    #232389

    Aggiungo allegato nel formato PRT

Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login