Ajout de condition pour indicateur Divergence RSI

Viewing 15 posts - 16 through 30 (of 48 total)
  • Author
    Posts
  • #120661 quote
    Al
    Participant
    Senior

    Oui, je comprends bien , c’est comme cela dans la V10.3 , sur la V11 : malgré que ce soit ” formaté dans le  code, alors on ne peut pas le changer dans l’interface des paramètres de l’indicateur”

    J’ai ceci …

    pic27.02.png pic27.02.png
    #120668 quote
    Nicolas
    Keymaster
    Master

    Désolé en effet je viens de tester et ya bien un truc qui cloche 🙄 Je vais reporter cela.. Merci !

    Al thanked this post
    #130336 quote
    cerealkilleur
    Participant
    New

    Bonjour,

    Je cherche à peu près les mêmes configurations pour cet indicateur.

    Je cherche dans un premier temps à le faire fonctionner

    Je viens de l’insérer dans prorealtime mais il ne trouve aucune divergence sur le marché français alors que manuellement j’en trouve.

    Le code a t’il un soucis?

    Quelle serait la ligne à modifier?

    Merci d’avance pour votre réponse

    #130404 quote
    Nicolas
    Keymaster
    Master

    Désolé, je ne comprends pas la question, de quel indicateur parles-tu ? Comme évoqué, on peut trouver une multitude de divergences avec ses yeux sur un graphique, mais un programme évalue des conditions strictes, mathématiques. Par ailleurs, il n’y a pas de définition stricte et académique de ce qu’est une divergence, donc chacun verra ce qu’il souhaite là où il le souhaite et pourra désigner une divergence, si il le veut 🙂

    #130525 quote
    cerealkilleur
    Participant
    New

    Bonjour Nicolas,

    En effet je suis d’accord avec toi que la divergence est assez subjectif en fonction de comment on l’interprète et de ce que l’on veut voir.

    Ce que je cherche n’est pas un indicateur, mais un screener de marché qui filtre à ma place les différents actifs, se taper manuellement la liste du SRD et de l’eurostoxx 600, c’est long, fastidieux et improductif.

    Les conditions du sreener sont les suivantes:

    Sur le prix, uniquement les clôtures ou ouvertures sont prises en compte et non les mèches.

    Le premier pic de la divergence doit obligatoirement se passer en zone de surachat (RSI sup à 70) ou survente (RSI inf à 30).

    Le creux (entouré en rouge) doit obligatoirement se trouver au dessus de la ligne des 60 du RSI pour une divergence baissière ou de la ligne des 40 pour une divergence haussière.

    Le second pic n’est pas forcément en zone de surachat ou survente.

    Un nombre  de 7 à 25 bougies doivent êtres comprises entre les 2 pics.

    La position sera ouverte manuellement, j’aimerais que le sreener me détecte l’actif et le fasse apparaître dans la liste un peu avant la cassure du creux entouré en rouge soit dans ce graphique à 60,89 du RSI

    Et comme une photo vaut mieux qu’un long discours

    Merci d’avance

    ATE-Journalier.png ATE-Journalier.png
    #130769 quote
    cerealkilleur
    Participant
    New

    Je suis désolé, mais je suis imccapable ce programmer ce genre de chose.

    Si quelqu’un arriverais à le faire, ça serai vraiment top.

    #132083 quote
    Joris
    Participant
    Junior

    Bonjour Nicolas,

     

    Il semble que ce code ne fonctionne pas ou plus sur V11

    Pouvez-vous y remédier svp ?

    //PRC_AnotherRSIdivergences | indicator
    //25.02.2019
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    // --- settings
    RSIp=14 //RSI period
    obLevel=70 //overbought level
    osLevel=30 //oversold level
    minimalBars=5 //minimal count of bars where RSI is ob or os
    minBarBetween = 4
    maxBarBetween = 16
    noLowerThan = 60
    noHigherThan = 40
    // --- end of settings
    
    irsi = rsi[RSIp]
    ob = irsi>obLevel
    os = irsi<osLevel
    
    if ob then
    if not ob[1] then
    maxrsi = 0
    maxprice = 0
    firstobbar = barindex
    endif
    maxrsi=max(maxrsi,irsi)
    maxprice=max(maxprice,high)
    if maxrsi<>maxrsi[1] then
    maxrsibar=barindex
    endif
    endif
    
    if os then
    if not os[1] then
    minrsi = 100
    minprice = close*100
    firstosbar = barindex
    endif
    minrsi=min(minrsi,irsi)
    minprice=min(minprice,low)
    if minrsi<>minrsi[1] then
    minrsibar=barindex
    endif
    endif
    
    divsell=0
    if irsi crosses under obLevel then
    //verif divergence
    barcount=maxrsibar-oldmaxrsibar
    div = maxprice>oldmaxprice and maxrsi<oldmaxrsi and (barindex-firstobbar)>=minimalBars and barcount>=minbarbetween and barcount<=maxbarbetween and summation[max(1,barcount)](irsi<noLowerThan)=0
    if div then
    //drawsegment(oldmaxrsibar,oldmaxrsi,maxrsibar,maxrsi) coloured(200,0,0)
    //drawarrowdown(maxrsibar,maxrsi) coloured(200,0,0)
    divsell=osLevel
    endif
    oldmaxrsi = maxrsi
    oldmaxprice = maxprice
    oldmaxrsibar = maxrsibar
    endif
    
    divbuy=0
    if irsi crosses over osLevel then
    //verif divergence
    barcount=minrsibar-oldminrsibar
    div = minprice<oldminprice and minrsi>oldminrsi and (barindex-firstosbar)>=minimalBars and barcount>=minbarbetween and barcount<=maxbarbetween and summation[max(1,barcount)](irsi>noHigherThan)=0
    if div then
    //drawsegment(oldminrsibar,oldminrsi,minrsibar,minrsi) coloured(0,200,0)
    //drawarrowup(minrsibar,minrsi) coloured(0,200,0)
    divbuy=osLevel
    endif
    oldminrsi = minrsi
    oldminprice = minprice
    oldminrsibar = minrsibar
    endif
    
    screener[divbuy or divsell](max(divbuy,divsell))
    #132108 quote
    Joris
    Participant
    Junior

    L’indicateur n’a pas l’air de vouloir fonctionner également

    #132117 quote
    Nicolas
    Keymaster
    Master

    Quelle version de l’indicateur stp ? Merci de poster le code avec l’outil approprié dans le corps du message (lire les règles de publication).

    #132138 quote
    Joris
    Participant
    Junior

    Merci pour ta réponse Nicolas

    Voici le code en question: Il n’a pas l’air de fonctionner sur la V11

    //PRC_AnotherRSIdivergences | indicator
    //25.02.2019
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    
    // --- settings
    RSIp=14 //RSI period
    obLevel=70 //overbought level
    osLevel=30 //oversold level
    minimalBars=5 //minimal count of bars where RSI is ob or os
    minBarBetween = 4
    maxBarBetween = 16
    noLowerThan = 60
    noHigherThan = 40
    // --- end of settings
    
    
    irsi = rsi[RSIp]
    ob = irsi>obLevel
    os = irsi<osLevel
    
    
    if ob then
    if not ob[1] then
    maxrsi = 0
    maxprice = 0
    firstobbar = barindex
    endif
    maxrsi=max(maxrsi,irsi)
    maxprice=max(maxprice,high)
    if maxrsi<>maxrsi[1] then
    maxrsibar=barindex
    endif
    endif
    
    
    if os then
    if not os[1] then
    minrsi = 100
    minprice = close*100
    firstosbar = barindex
    endif
    minrsi=min(minrsi,irsi)
    minprice=min(minprice,low)
    if minrsi<>minrsi[1] then
    minrsibar=barindex
    endif
    endif
    
    
    divsell=0
    if irsi crosses under obLevel then
    //verif divergence
    barcount=maxrsibar-oldmaxrsibar
    div = maxprice>oldmaxprice and maxrsi<oldmaxrsi and (barindex-firstobbar)>=minimalBars and barcount>=minbarbetween and barcount<=maxbarbetween and summation[max(1,barcount)](irsi<noLowerThan)=0
    if div then
    //drawsegment(oldmaxrsibar,oldmaxrsi,maxrsibar,maxrsi) coloured(200,0,0)
    //drawarrowdown(maxrsibar,maxrsi) coloured(200,0,0)
    divsell=osLevel
    endif
    oldmaxrsi = maxrsi
    oldmaxprice = maxprice
    oldmaxrsibar = maxrsibar
    endif
    
    
    divbuy=0
    if irsi crosses over osLevel then
    //verif divergence
    barcount=minrsibar-oldminrsibar
    div = minprice<oldminprice and minrsi>oldminrsi and (barindex-firstosbar)>=minimalBars and barcount>=minbarbetween and barcount<=maxbarbetween and summation[max(1,barcount)](irsi>noHigherThan)=0
    if div then
    //drawsegment(oldminrsibar,oldminrsi,minrsibar,minrsi) coloured(0,200,0)
    //drawarrowup(minrsibar,minrsi) coloured(0,200,0)
    divbuy=osLevel
    endif
    oldminrsi = minrsi
    oldminprice = minprice
    oldminrsibar = minrsibar
    endif
    
    screener[divbuy or divsell](max(divbuy,divsell))

    De plus te serait-il également possible de regarder cet indicateur (même code)

    Lui aussi ne marche pas super sur la V11

    //PRC_AnotherRSIdivergences | indicator
    //25.02.2019
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    
    // --- settings
    RSIp=14 //RSI period
    obLevel=70 //overbought level
    osLevel=30 //oversold level
    minimalBars=5 //minimal count of bars where RSI is ob or os
    minBarBetween = 4
    maxBarBetween = 16
    noLowerThan = 60
    noHigherThan = 40
    // --- end of settings
    
    
    irsi = rsi[RSIp]
    ob = irsi>obLevel
    os = irsi<osLevel
    
    
    if ob then
    if not ob[1] then
    maxrsi = 0
    maxprice = 0
    firstobbar = barindex
    endif
    maxrsi=max(maxrsi,irsi)
    maxprice=max(maxprice,high)
    if maxrsi<>maxrsi[1] then
    maxrsibar=barindex
    endif
    endif
    
    
    if os then
    if not os[1] then
    minrsi = 100
    minprice = close*100
    firstosbar = barindex
    endif
    minrsi=min(minrsi,irsi)
    minprice=min(minprice,low)
    if minrsi<>minrsi[1] then
    minrsibar=barindex
    endif
    endif
    
    
    divsell=0
    if irsi crosses under obLevel then
    //verif divergence
    barcount=minrsibar-oldminrsibar
    div = maxprice>oldmaxprice and maxrsi<oldmaxrsi and (barindex-firstobbar)>=minimalBars and barcount>=minbarbetween and barcount<=maxbarbetween and summation[max(1,barcount)](irsi<noLowerThan)=0
    if div then
    drawsegment(oldmaxrsibar,oldmaxrsi,maxrsibar,maxrsi) coloured(200,0,0)
    drawarrowdown(maxrsibar,maxrsi) coloured(200,0,0)
    divsell=osLevel
    endif
    oldmaxrsi = maxrsi
    oldmaxprice = maxprice
    oldmaxrsibar = maxrsibar
    endif
    
    
    divbuy=0
    if irsi crosses over osLevel then
    //verif divergence
    barcount=minrsibar-oldminrsibar
    div = minprice<oldminprice and minrsi>oldminrsi and (barindex-firstosbar)>=minimalBars and barcount>=minbarbetween and barcount<=maxbarbetween and summation[max(1,barcount)](irsi>noHigherThan)=0
    if div then
    drawsegment(oldminrsibar,oldminrsi,minrsibar,minrsi) coloured(0,200,0)
    drawarrowup(minrsibar,minrsi) coloured(0,200,0)
    divbuy=osLevel
    endif
    oldminrsi = minrsi
    oldminprice = minprice
    oldminrsibar = minrsibar
    endif
    
    
    return irsi style(line,2) as "RSI",obLevel coloured(168,168,168) style(dottedline,1) as "overbought level", osLevel coloured(168,168,168) style(dottedline,1) as "oversold level", divsell coloured(200,0,0) style(histogram) as "sell divergence", divbuy coloured(0,200,0) style(histogram) as "buy divergence"
    

    Merci beaucoup pour ton aide

    #132740 quote
    henri95
    Participant
    Average

    Bonjour, oui idem pour moi. Il ne donne aucune valeur. J’ai essayé sur toutes les unités de temps. Il m’en a donné une seule cette semaine et qui a disparu quelques secondes après.

    Peut-être s’inspirer du screener “RSI Divergences Scr” qui lui fonctionne très bien, mis à part qu’il donne également des valeurs sans le signal fléché, mais pas grave il fonctionne quand même.

    Je ne m’y connais pas suffisamment pour transformer un indicateur complexe en screener.

    #133607 quote
    Joris
    Participant
    Junior

    Bonjour Nicolas,

    Avez vous eu unpeu de temps pour voir le problème pour la V11 des codes ci-dessus ?

    Merci

    #134588 quote
    Joris
    Participant
    Junior

    Bonjour Nicolas,

    Je me permets de revenir vers vous pour votre codage

     

    Cdt

    #134962 quote
    Nicolas
    Keymaster
    Master

    L’indicateur fonctionne correctement (voir image), les conditions que vous utilisez sont tellement restrictives que presque aucune divergence n’est détecté.  A nouveau, cet indicateur utilise quelques conditions précises (quantité de chandeliers entre les 2 points, niveaux minimum/maximum de chaque point, etc..) qu’il faut bien intégrer pour comprendre comment il fonctionne.

    Avec des paramètres très (trop) simpliste, on trouve un tas de “divergences”:

    // --- settings
    RSIp=14 //RSI period
    obLevel=55 //overbought level
    osLevel=45 //oversold level
    minimalBars=1 //minimal count of bars where RSI is ob or os
    minBarBetween = 1
    maxBarBetween = 30
    noLowerThan = 30
    noHigherThan = 70
    // --- end of settings

    A vous d’affiner selon vos recherches, bon courage 😉

    divergences-RSI-prorealtime.png divergences-RSI-prorealtime.png
    #135033 quote
    Joris
    Participant
    Junior

    Merci pour votre réponse

    Avez vous testé le Screener ? En laissant vos réglage il ne trouve jamais rien…Sur V11

Viewing 15 posts - 16 through 30 (of 48 total)
  • You must be logged in to reply to this topic.

Ajout de condition pour indicateur Divergence RSI


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 47 replies,
has 5 voices, and was last updated by JC_Bywan
2 years, 10 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/16/2019
Status: Active
Attachments: 9 files
Logo Logo
Loading...