créer ProBackTest avec indicateur SSL Hybrid

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #228571 quote
    francis59
    Participant
    New

    Bonjour,

    Serait-il possible de m’aider à créer un ProBackTest avec l’indicateur SSL-Hybrid : https://www.prorealcode.com/prorealtime-indicators/ssl-hybrid-indicator/

    Critères ACHAT : lorsque “SSL Hybrid -ATR” croise à la hausse “SSL Hybrid baseline”

    Critères VENTE : lorsque “SSL Hybrid -ATR” croise à la baisse “SSL Hybrid baseline”

    Si ce n’est pas pertinent ou si cela mérite d’être complété par votre expertise, n’hésitez surtout pas! 🙂

    D’avance merci et bonne journée

    Good morning,

    Would it be possible to help me create a ProBackTest with the SSL-Hybrid indicator: https://www.prorealcode.com/prorealtime-indicators/ssl-hybrid-indicator/

    PURCHASE criteria: when “SSL Hybrid -ATR” crosses upwards “SSL Hybrid baseline”

    SALE criteria: when “SSL Hybrid -ATR” crosses downward “SSL Hybrid baseline”

    If it is not relevant or if it deserves to be supplemented by your expertise, do not hesitate! 🙂

    Thanks in advance and have a good day

    #228686 quote
    JS
    Participant
    Senior

    Hi @francis59

    I don’t quite understand what you mean by “SSL Hybrid-ATR”…
    Alternatively, the system that uses the “Close” and the “BaseLine”…

    atrlen = 14 //(Integer)
    mult = 1 //(Decimal)
    smoothing=2 //(Average type. Default WMA)
    //showcandleviolation=true //(Boolean)
    //showcolor=true (Boolean)
    //showSSL2=true (Boolean)
    ssl1Type = 7 //(Average type. Default HMA)
    len = 60 //(Integer)
    ssl2Type = 7 //(Average type. Default HMA)
    len2 = 5 //(Integer)
    Exittype = 7 //(Average type. Default HMA)
    len3 = 15 //(Integer)
    //showbaseline = true (Boolean)
    baselinetype = 7 //(Average type. Default HMA)
    Usetruerange = 1 //(Boolean)
    multy = 0.2 //(Decimal)
    //////////////////////////////////////////////////////////////////
    //atr
    atrlensmoot = average[atrlen,smoothing](TR(close))
    
    //atr up/low bands
    upperband = atrlensmoot * mult + close
    lowerband = close - atrlensmoot * mult
    
    ////Ssl 1
    emahigh = average[len,ssl1Type](high)
    emalow = average[len,ssl1Type](low)
    
    ////Ssl 2
    mahigh = average[len2,ssl2Type](high)
    malow = average[len2,ssl2Type](low)
    
    ////Exit
    src = CustomClose
    exithigh = average[len3,ExitType](high)
    exitlow = average[len3,ExitType](low)
    
    ////keltner baseline channel
    bbmc = average[len,baselineType](close)
    keltma = average[len,baselineType](src)
    if UseTrueRange then
    myrange = tr
    else
    myrange = high-low
    endif
    
    rangema = exponentialaverage[len](myrange)
    upperk = keltma + rangema * multy
    lowerk = keltma - rangema * multy
    
    ////baseline violation candle
    openpos = open*1
    closepos = close*1
    difference = abs(closepos-openpos)
    atrviolation = difference > atrlensmoot
    inrange = upperband > bbmc and lowerband < bbmc
    candlesizeviolation = atrviolation and inrange
    
    //Ssl1 values
    if close > emahigh then
    hlv = 1
    elsif close < emalow then
    hlv = -1
    else
    hlv = hlv[1]
    endif
    
    if Hlv < 0 then
    ssldown = emahigh
    else
    ssldown = emalow
    endif
    
    //Ssl2 values
    if close > mahigh then
    hlv2 = 1
    elsif close < malow then
    hlv2 = -1
    else
    hlv2 = hlv[1]
    endif
    
    if hlv2 < 0 then
    ssldown2 = mahigh
    else
    ssldown2 = malow
    endif
    
    //Exit values
    if close > exithigh then
    hlv3 = 1
    elsif close < exitlow then
    hlv3 = -1
    else
    hlv3 = hlv3[1]
    endif
    
    if hlv3 < 0 then
    sslexit = exithigh
    else
    sslexit = exitlow
    endif
    
    basecrosslong = close crosses over sslexit
    basecrossshort = sslexit crosses over close
    
    if basecrosslong then
    codiff = 1
    elsif basecrossshort then
    codiff = -1
    else
    codiff = 0
    endif
    
    /////////SSL2 continuation from ATR//////////////
    atrcrit =0.9
    upperhalf = atrlensmoot * atrcrit + close
    lowerhalf = close - atrlensmoot * atrcrit
    buyinatr = lowerhalf < ssldown2
    buycont = close > bbmc and close > ssldown2
    sellinatr = upperhalf > ssldown2
    sellcont = close < bbmc and close < ssldown2
    buyatr = buyinatr and buycont
    sellatr = sellinatr and sellcont
    //Points colour
    if buyatr then
    rpto = 76
    gpto = 175
    bpto = 80
    elsif sellatr then
    rpto = 156
    gpto = 39
    bpto = 176
    else
    rpto = 200
    gpto = 200
    bpto = 200
    endif
    
    If Close Crosses Over BBMC then
    Buy 1 contract at Market
    EndIf
    
    If Close Crosses Under BBMC then
    SellShort 1 contract at Market
    EndIf
    
    Scherm­afbeelding-2024-02-24-om-13.12.46.png Scherm­afbeelding-2024-02-24-om-13.12.46.png
    #228763 quote
    francis59
    Participant
    New

    Hi JS,

    Thanks for your quick and clear answer, that’s was I looked for.

    One more help, is it possible to create a screener to catch the right time to BUY and/or SELL based on your work above?

    Thanks a lot in advance.

    Have a good day

    #228793 quote
    robertogozzi
    Moderator
    Master

    @francis59

    Only post in the language of the forumthat you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.

    Thanks 🙂

    francis59 thanked this post
    #228798 quote
    francis59
    Participant
    New

    Bonjour,

    Oui veuillez m’excuser, c’est bien noté 🙂

    Bonne journée

    P.S: si jamais ma demande  ci-dessus n’est pas utile, dites-le moi pour clôturer le sujet sinon par hasard, saurez-vous y répondre? 🙂 d’avance merci

    Good morning,

    Yes, please excuse me, it is well noted 🙂

    Good day

    P.S: if my request above is not useful, tell me to close the subject otherwise by chance, will you be able to answer it? 🙂 thanks in advance

    #228799 quote
    JS
    Participant
    Senior

    Hi Francis,

    Unfortunately, I don’t know the code enough to make it a meaningful screener…

    francis59 thanked this post
    #228804 quote
    robertogozzi
    Moderator
    Master
    @francis59 Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums Thanks 🙂
    francis59 thanked this post
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

créer ProBackTest avec indicateur SSL Hybrid


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
francis59 @francis51 Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by robertogozzi
1 year, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/22/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...