Tendances

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #249829 quote
    Philippe
    Participant
    New

    Bonjour,

    Je ne suis pas absolument pas un expert codeur alors je souhaiterais obtenir vos avis pour débuter sur cette idée :

    Je cherche à afficher sur un graphique, commençons par les actions, quelque soit l’unité de temps, la tendance CT (daily), MT(Hebdo) et LT (monthly).

    Je sais à peu près détecter les tendances via ichimoku (SSA>SSB) sur les 26 dernière périodes. J’aimerais un indicateur, en bas, vert si c’est haussier et rouge si baissier. Un indicateur qui m’affiche la couleur sur les 3 unités de temps désirées c’est à dire, en réalité 3 carrés. Çà m’éviterait de jongler dans les graphiques. En résumé, par exemple, un rectangle Vert-Vert-Rouge si les tendances CT et MT sont haussières et si la tendance LT est baissière.

    Merci par avance pour votre aide.

    #249851 quote
    Iván González
    Moderator
    Master

    Ici, vous avez un exemple comme faire.

    timeframe(monthly,updateonclose)
    SpanAm=SenkouSpanA[9,26,52]
    SpanBm=SenkouSpanB[9,26,52]
    if spanAm>SpanBm then
       rm=0
       gm=255
    else
       rm=255
       gm=0
    endif
    timeframe(weekly,updateonclose)
    SpanAw=SenkouSpanA[9,26,52]
    SpanBw=SenkouSpanB[9,26,52]
    
    if spanAw>SpanBw then
       rw=0
       gw=255
    else
       rw=255
       gw=0
    endif
    
    timeframe(daily)
    SpanAd=SenkouSpanA[9,26,52]
    SpanBd=SenkouSpanB[9,26,52]
    
    if spanAd>SpanBd then
       rd=0
       gd=255
    else
       rd=255
       gd=0
    endif
    
    drawhline(1)style(dottedline)
    drawhline(2)style(dottedline)
    drawhline(3)style(dottedline)
    
    return 3 style(histogram)coloured(rd,gd,0) as "daily", 2 style(histogram)coloured(rw,gw,0) as "weekly", 1 style(histogram)coloured(rm,gm,0) as "monthly",0
    
    #249995 quote
    Philippe
    Participant
    New

    Merci

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

Tendances


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Philippe @philippe-c Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Philippe
5 months, 2 weeks ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 08/17/2025
Status: Active
Attachments: No files
Logo Logo
Loading...