Creazione di una strategia con indicatore di scalping

Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #83077 quote
    MarcotradingMarcotrading
    Participant
    Junior

    Perfetto, funziona. Grazie tante Nicolas e Roberto per la disponibilità

    #131901 quote
    GaspareGaspare
    Participant
    Veteran

     

    // SCALPING DAX INIDCATOR, USABLE ON ANY TOOL, SET UP TIME FRAME 1 MINUTE.
    // PRC CONTRIBUTE_ ALE_15/12/2017
    //DEFPARAM CALCULATEONLASTBARS=50000
    //WHB=6
    //WHS=6
    //BIB=6
    //BIS=6
    //PPKKS=0.994
    //PPKKB=0.994
    //RES=3
    //SUP=3
    
    // GRAPHIC VARIABLES
    PIP                 = 1*Pipsize      //ARROW DISTANCE
    LIN                 = 20             //LENGTH OF SEGMENT OF SUPPORT OR RESISTENCE
    RESISTENCE          = RES*Pipsize    //DISTANCE OF THE SEGMENT OF THE RESISTENCE
    SUPPORT             = SUP*Pipsize    //DISTANCE OF THE SEGMENT OF THE SUPPORT
    // ENABLED PARNER   1-0 / ON-OFF
    ONCE PrEnabled01    = P01           // SWITCH INDICATOR P01,P02 ETC ..
    
    //////////////////////////////////////////////////////////////////////
    // MODIFIED UNIVERSAL OSCILLATOR 1
    whitenoiseB= (Close - Close[WHS])
    if barindex>BIS then
    a11= exp(-1.414 * 3.14159 / BIS)
    b11= 2*a11 * Cos(1.414*180 /BIS)
    c22= b11
    c33= -a11 * a11
    c11= 1 - c22 - c33
    filtB= c11 * (whitenoiseB + whitenoiseB[1])/2+ c22*filtB[1] + c33*filtB[1]
    filt11 = filtB
    if ABS(filt11)>pkB[1] then
    pkB = ABS(filt11)
    else
    pkB = PPKKS * pkB[1]
    endif
    if pkB=0 then
    denomB = -1
    else
    denomB = pkB
    endif
    if denomB = -1 then
    resultB = resultB[1]
    else
    resultB = filt11/pkB
    endif
    endif
    // MODIFIED UNIVERSAL OSCILLATOR 2
    whitenoise= (Close - Close[WHB])
    if barindex>BIB then
    // super smoother filter
    a1= (-1.414 * 3.14159 / BIB)
    b1= 2*a1 * Cos(1.414*180 /BIB)
    c2= b1
    c3= -a1 * a1
    c1= 1 - c2 - c3
    filt= c1 * (whitenoise + whitenoise[1])/2+ c2*filt[1] + c3*filt[1]
    filt1 = filt
    if ABS(filt1)>pk[1] then
    pk = ABS(filt1)
    else
    pk = PPKKB * pk[1]
    endif
    if pk=0 then
    denom = -1
    else
    denom = pk
    endif
    if denom = -1 then
    resultS = resultS[1]
    else
    resultS = filt1/pk
    endif
    endif
    
    //////////////////////////////////////////////////////////////////////
    //PATNER UP 1
    PrUp01 =  results <-0.5
    PrUp01 =  PrUp01 and  results crosses over resultb
    PrUp01 = (PrUp01 and PrEnabled01)
    //PATNER DOWN 1
    PrDw01 = results >0.5
    PrDw01 = PrDw01 and results crosses under resultb
    PrDw01 = (PrDw01 and PrEnabled01)
    
    //////////////////////////////////////////////////////////////////////
    // COLORS OF THE ARROW AND SEGMENT
    IF PrUp01 THEN
    R=0
    G=128
    B=255
    ELSIF PrDw01 THEN
    R=0
    G=128
    B=255
    endif
    
    if  TIME >=80000 and time <=210000 THEN
    if PrUp01  then
    DRAWARROWUP(barindex,LOW-PIP)coloured(R,G,B)
    DRAWSEGMENT(barindex,LOW-SUPPORT,barindex-LIN, LOW-SUPPORT )coloured(R,G,B)
    elsif PrDw01  then
    DRAWARROWDOWN(barindex,HIGH+PIP)coloured(R,G,B)
    DRAWSEGMENT(barindex,HIGH+RESISTENCE,barindex-LIN, HIGH+RESISTENCE)coloured(R,G,B)
    endif
    
    ENDIF
    
    RETURN PrUp01,PrDw01
    

    Buongiorno

    per favore potresti postare il codice completo del “SCALPING INDICATOR V2”[6, 6, 16,13, 0.994, 0.994, 3, 3, 1],

    non riesco a inserire l’ultima impostazione     1 (= true),   perché l’indicatore possa impostare i segnali sul grafico.

    I valori delle variabili della versione attuale sono [ 6, 6, 16, 13, 0.994, 0.994, 3, 3, f  ] che allego; se lo richiamo mi schiaccia il grafico.

    grazie

    #133563 quote
    R05R05
    Participant
    Veteran

    Ciao Roberto questo indicatore mi sembra molto interessante e ho provato ad usare il codice da te proposto, solo che mi da l’errore che ti allego. Mi aiuteresti?

    defparam cumulateorders=false
     
    FrecciaSU,FrecciaGIU = CALL "SCALPING INDICATOR V2"[6, 6, 16, 13, 0.994, 0.994, 3, 3, 1]
     
    if FrecciaSU<>FrecciaSU[1] then
    buy at market
    endif
     
    if FrecciaGIU<>FrecciaGIU[1] then
    sellshort at market
    endif
     
    set target pprofit 30
    set stop ploss 60
     
    graph FrecciaSU
    graph FrecciaGIU
    #133564 quote
    R05R05
    Participant
    Veteran

    Inserisco l’errore, prima non me l’ha preso

    Errore.jpg Errore.jpg
    #133574 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Perché non restituisce nessun valore, non c’è scritto niente accanto a RETURN.

    È un indicatore solo visivo.

    Midifica le ultime righe, dalla 98 in poi, così:

    FrecciaSU  = 0
    FrecciaGIU = 0
    if  TIME >=80000 and time <=210000 THEN
     if PrUp01  then
       FrecciaSU  = 1
      DRAWARROWUP(barindex,LOW-PIP)coloured(R,G,B)
      DRAWSEGMENT(barindex,LOW-SUPPORT,barindex-LIN, LOW-SUPPORT )coloured(R,G,B)
     elsif PrDw01  then
       FrecciaGIU = 1
      DRAWARROWDOWN(barindex,HIGH+PIP)coloured(R,G,B)
      DRAWSEGMENT(barindex,HIGH+RESISTENCE,barindex-LIN, HIGH+RESISTENCE)coloured(R,G,B)
     endif
    ENDIF
     
    RETURN FrecciaSU,FrecciaGIU

    e dovrebbe funzionare.

    #133608 quote
    R05R05
    Participant
    Veteran

    Ho provato anche a fare anche il sistema seguente ma mi da sempre errore. Non capisco il motivo.

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    // Condizioni per entrare su posizioni long
    indicator1 = CALL "SCALPING INDICATOR V2"[6, 6, 16, 13, 0.994, 0.994, 3, 3, 1]
    c1 = (close > indicator1)
    
    IF c1 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Condizioni per entrare su posizioni short
    indicator2 = CALL "SCALPING INDICATOR V2"[6, 6, 16, 13, 0.994, 0.994, 3, 3, 1]
    c2 = (close < indicator2)
    
    IF c2 THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Stop e target
    SET STOP pLOSS 10
    SET TARGET pPROFIT 10
    Errore-1.jpg Errore-1.jpg
    #133611 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Sempre lo stesso motivo. Sopra hai la soluzione.

    #133612 quote
    R05R05
    Participant
    Veteran

    Scusa Roberto non avevo capito. Il fatto è che queste parole DRAWARROWUP e DRAWSEGMEN non me le prende perchè sono usate solo per probuilder, mi esce la scritta.

    errore-2.jpg errore-2.jpg
    #133616 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Devi modificare l’indicatore.

    La strategia va bene quella che avevi postato sopra.

    #133637 quote
    R05R05
    Participant
    Veteran

    Ok fatto. Grazie Roberto gentilissimo. Funziona correttamente.

Viewing 10 posts - 16 through 25 (of 25 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Creazione di una strategia con indicatore di scalping


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

This topic contains 24 replies,
has 5 voices, and was last updated by R05R05
6 years, 4 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 10/16/2018
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...