Trading system con Harsi

Forums ProRealTime forum Italiano Supporto ProOrder Trading system con Harsi

Viewing 1 post (of 1 total)
  • #239166

    Ciao. Vorrei provare un trading system basato sull’indicatore Harsi, che è già stato codificato (lo riporto sotto) e come indicatore funziona. Tuttavia se lo infilo in un trading system automatico non parte neppure il backtest, segnalando che la funzione da  5 valori invece che  6 . (boh ….) Magari qualche anima pia (Roberto Gozzi) che mi aiuta …

    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    // HARSI  by JS le 02.10.2023 modifié  02.10.2023
    defparam calculateonlastbars = 150
    //variables:
    rsip=7
    smoothing=1
    halength=14
    rsihelp= RSI[rsip]((high+close+low+open)/4)//-50
    rsihelp2= RSI[halength]((high+close+low+open)/4)//-50
    closersi2= rsi[halength](close)//-50
    if barindex>0 then
    openrsi2=rsi[halength](close[1])//-50
    else
    openrsi2=rsi[halength](close)//-50
    endif
    rsihighraw2= rsi[halength](high)//-50
    rslowraw2= rsi[halength](low)//-50
    rsihigh2= max(rsihighraw2,rslowraw2)
    rsilow2=min(rsihighraw2,rslowraw2)
    haclose= (closersi2+openrsi2+rsihigh2+rsilow2)/4
    if barindex > halength+2 then
    haopen = ((haopen[1]*smoothing) +haclose[1])/(smoothing+1)
    else
    haopen = (closersi2 +openrsi2)/2
    endif
    hahigh= max(rsihigh2, max(haopen,haclose))
    halow = min(rsilow2 , min( haopen, haclose))
    if haclose > haopen then
    r=0
    g=153
    b=153
    else
    r=238
    g=73
    b=73
    endif
    DRAWCANDLE(haopen, hahigh, halow, haclose) COLOURED(r,g,b) BORDERCOLOR(R,G,B)
    if barindex > rsip then
    rsismoothed = (rsismoothed[1]+ rsihelp)/2
    else
    rsismoothed = rsihelp
    endif
    return rsismoothed as “RSI-Smoothed”, 20 as “20”, 30 as “30”, 70 as “70”, 80 as “80”
Viewing 1 post (of 1 total)

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