Squeeze MTF

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #161063 quote
    Soyouzzz1Soyouzzz1
    Participant
    Junior

    Bonjour, je voudrais créer un indicateur de compression haussière qui serait actif aussi longtemps que le MACD 5/8/5 en 1 minute est vert.

    Mon problème est que lorsque j’applique l’indicateur sur un graphique de 1 minute, le délai multi ne fonctionne pas parce que l’indicateur montre 1 minute de compressions et non pas 5 minutes de compressions.

    Quelqu’un peut-il m’aider?

    Voici le code:

    bbb = BollingerDown[20](close)
    bbh = BollingerUp[20](close)
    histo = MACD[5,8,5](close)
    
    // ********************************* BUY ***********************
    
    timeframe(5minutes)
    
    // bbh>bbh-1
    c1 = bbh>bbh[1]
    
    // bbb<bbb-1
    c2 = bbb<bbb[1]
    
    // high>bbh ou low<bbb
    c3 = high>bbh or low<bbb
    
    
    timeframe(1minute)
    
    // MACD 1 minute vert
    c4 = histo>0
    
    
    squeeze =  c1 and c2 and c3 and c4
    
    
    if squeeze then
    backgroundcolor (0, 204, 203)
    endif
    
     
    return
    squeeze.png squeeze.png
    #161070 quote
    NicolasNicolas
    Keymaster
    Legend

    Dans le code ci-dessus, les indicateurs ne sont pas déclarés dans le timeframe 5-minutes, car leurs codes ne se situent pas en dessous de l’instruction TIMEFRAME(5 minutes), mais utilise le timeframe affiché.

    Soyouzzz1 thanked this post
    #161078 quote
    VonasiVonasi
    Moderator
    Master

    Soyouzzz1 – Votre sujet a été déplacé vers le forum francophone car vous avez choisi de communiquer en français mais posté dans les forums anglophones. Soyez plus prudent avec les futurs sujets à publier au bon endroit.

    Soyouzzz1 thanked this post
    #161098 quote
    Soyouzzz1Soyouzzz1
    Participant
    Junior

    Thank you for your help.
    Here is the right code if someone is interested:
    (precision: I use this indicator to scalp micro-tracements to get some ticks)

    timeframe(5minutes)
    
    bbd = BollingerDown[20](close)
    bbu = BollingerUp[20](close)
    
    // bbu>bbu-1
    c1 = bbu>bbu[1]
     
    // bbd<bbd-1
    c2 = bbd<bbd[1]
     
    // high>bbu ou low<bbd
    c3 = high>bbu or low<bbd
     
     
    timeframe(1minute)
    
    histo = MACD[5,8,5](close)
    
    // MACD 1min green
    c4 = histo>0
     
     
    squeeze =  c1 and c2 and c3 and c4
     
     
    if squeeze then
    backgroundcolor (0, 204, 203)
    endif
     
     
    return
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Squeeze MTF


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Soyouzzz1 @soyouzzz1 Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Soyouzzz1Soyouzzz1
5 years, 7 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 02/11/2021
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...