Pas de twist nuage futur

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #185919 quote
    PRC_2021
    Participant
    Average

    Bonjour,

    Petite question (possiblement bête…), mais j’ai bien trouvé le code pour avoir le twist du nuage futur.

    Seulement, pour ma part, je recherche lorsqu’il n’y a pas de twist dans le nuage futur ?

    J’ai recherché des instructions avec le “not” mais je n’y arrive pas.

    Merci de vos réponse.

    #186884 quote
    JC_Bywan
    Moderator
    Master

    Bonsoir, svp peux-tu rajouter le code que tu as utilisé pour le nuage futur, pour que selon comment il est codé (que graphique, numérique avec tableau, autre…) on voit comment y greffer ton non-twist

    #186980 quote
    PRC_2021
    Participant
    Average

    Bonjour,

    Voici mon code du nuage futur (SpanAfutureH1 et SpanBfutureH1) et voici également ce que j’ai essayé de coder dernièrement :

    timeframe (1 hours)
    tenkanH1=(highest[9](high)+lowest[9](low))/2
    kijunH1=(highest[26](high)+lowest[26](low))/2
    SpanAfutureH1=(kijunH1+kijunH1)/2
    SpanBfutureH1=(highest[52](high)+lowest[52](low))/2
    SpanAH1 = (tenkanH1[26]+kijunH1[26])/2
    SpanBH1 = (highest[52](high[26])+lowest[52](low[26]))/2
    seuil = 0.001 //seuil minimal en pourcentage pour non croisement
    
    test = summation[26](((SpanAfutureH1-SpanBfutureH1)*100)>= seuil)=26
    

    Merci pour ton aide.

    #186986 quote
    PRC_2021
    Participant
    Average

    En gros, je voudrais avoir comme conditions :

    • pendant les 26 unités du nuage futur, SSA Futur > SSB Futur

    ou

    • pendant les 26 unités du nuage futur, SSA Futur < SSB Futur
    #187005 quote
    JC_Bywan
    Moderator
    Master

    Ok, on peut remplacer la ligne 10 par ceci, pas de futur twist étant vrai lorsque la variable “nofuturtwistok” vaudra 1 (et twist futur quand elle reste est à 0):

    test1 = summation[26](SpanAfutureH1>=SpanBfutureH1*(1+seuil))=26
    test2 = summation[26](SpanBfutureH1>=SpanAfutureH1*(1+seuil))=26
    
    nofuturtwistok=0
    if spanA>spanB and test1 then
     nofuturtwistok=1
    elsif spanA<spanB and test2 then
     nofuturtwistok=1
    endif
    #187009 quote
    PRC_2021
    Participant
    Average

    Je viens de tester mais je ne comprend pas les résultats.

    Normalement, étant donné qu’il n’y a pas de twist futur, j’aurais du avoir l’alerte ? voir en pj

    timeframe (1 hours)
    tenkanH1=(highest[9](high)+lowest[9](low))/2
    kijunH1=(highest[26](high)+lowest[26](low))/2
    SpanAfutureH1=(kijunH1+kijunH1)/2
    SpanBfutureH1=(highest[52](high)+lowest[52](low))/2
    SpanAH1 = (tenkanH1[26]+kijunH1[26])/2
    SpanBH1 = (highest[52](high[26])+lowest[52](low[26]))/2
    seuil = 0.001 //seuil minimal en pourcentage pour non croisement
    
    
    c1 = summation[26](SpanAfutureH1>=SpanBfutureH1*(1+seuil))=26
    c2 = SpanAH1 > SpanBH1
    
    cond1 = (c1 and c2)
    
    return (cond1)coloured(244,187,255)STYLE(histogram,2)
    test.png test.png
    #187012 quote
    JC_Bywan
    Moderator
    Master

    Il y a une erreur dans ton SpanAfutureH1 en ligne 4 qui utilise 2 fois kijunH1 au lieu de faire la moyenne de kijunH1 avec tenkanH1, il faudrait re-essayer avec:

    SpanAfutureH1=(tenkanH1+kijunH1)/2
    PRC_2021 thanked this post
    #187017 quote
    PRC_2021
    Participant
    Average

    Ca à l’air de fonctionner. Merci beaucoup.

    #187036 quote
    PRC_2021
    Participant
    Average

    Ca à l’air de fonctionner. Merci beaucoup.

    En fait non, j’ai toujours des incohérences dans les résultats comme ci joint :

    timeframe (1 hours)
    tenkanH1=(highest[9](high)+lowest[9](low))/2
    kijunH1=(highest[26](high)+lowest[26](low))/2
    SpanAfutureH1=(tenkanH1+kijunH1)/2
    SpanBfutureH1=(highest[52](high)+lowest[52](low))/2
    SpanAH1 = (tenkanH1[26]+kijunH1[26])/2
    SpanBH1 = (highest[52](high[26])+lowest[52](low[26]))/2
    seuil = 0.001 //seuil minimal en pourcentage pour non croisement
    
    
    c1 = summation[26](SpanAfutureH1>=SpanBfutureH1*(1+seuil))=26
    c12 = SpanAH1 > SpanBH1
    cond1 = (c1 and c12)
    
    c2 = summation[26](SpanBfutureH1>=SpanAfutureH1*(1+seuil))=26
    c22 = SpanAH1 < SpanBH1
    cond2 = (c2 and c22)
    
    return cond1 coloured(154,205,50)STYLE(histogram,2), cond2 coloured(244,187,255)STYLE(histogram,2)
    test-1.png test-1.png
    #187040 quote
    JC_Bywan
    Moderator
    Master

    Je ne pense pas que ce soit une incohérence, tu sembles chercher visuellement un twist sans seuil mais tu as mis un seuil 0.001 non nul. Si je teste ce code sur GBPJPY en 1h et en mettant seuil=0, alors la zone que tu as entourée se remplit, donc a priori si on ne voit pas d’histogramme dans ta zone entourée, ce serait que SpanAfutureH1 et SpanBfutureH1 seront rapprochées assez pour que leur écart soit sous le seuil sans pour autant s’être croisées, ce qui semble être le cas le 21/01 vers 16h.

    PRC_2021 thanked this post
    #187077 quote
    PRC_2021
    Participant
    Average

    D’accord, je comprend. Merci pour cette précision.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.

Pas de twist nuage futur


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
PRC_2021 @manu35250 Participant
Summary

This topic contains 10 replies,
has 2 voices, and was last updated by PRC_2021
4 years, 1 month ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/19/2022
Status: Active
Attachments: 2 files
Logo Logo
Loading...