créer un screener basé sur 1-2-3 pattern

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #220570 quote
    francis59francis59
    Participant
    Junior

    Bonjour,

    Serait-il utile de créer un screener basé sur 1-2-3 pattern pour détecter le moment d’achat en tendance haussière? Si oui, est-ce que quelqu’un aurait la compétence et le temps de le faire? 🙂

    1-2-3 Pattern Indicator

    D’avance merci et bonne journée!

    #220688 quote
    NicolasNicolas
    Keymaster
    Legend

    Ci-dessous le code du scanner pour trouver les patterns 1-2-3 selon cet indicateur:

    //---Initialisation
    prd = 10
    
    
    signal=0
    
    once idx0 = 0
    once idx1 = 0
    once idx2 = 0
    once pos = 0
    
    //ATR = AverageTrueRange[prd](typicalprice)
    
    IF barindex >= 2*prd+1 then
    
    If high[prd] >= highest[2*prd+1](high) and pos<=0 then
    
    If idx1 <> 0 then
    idx2 = idx1
    Endif
    
    If idx0 <> 0 then
    idx1 = idx0
    Endif
    
    idx0 = barindex[prd]
    pos=1
    
    If idx2<>0 then
    
    //If showPvts then
    //If High[barindex-idx0]>=High[barindex-idx2] then
    //DRAWTEXT("HH",idx0,High[barindex-idx0]+ATR/2,Dialog,Bold,20) coloured(200,0,0,255)
    //else
    //DRAWTEXT("LH",idx0,High[barindex-idx0]+ATR/2,Dialog,Bold,20) coloured(200,0,0,255)
    //Endif
    //Endif
    
    Endif
    Endif
    
    If Low[prd] <= Lowest[2*prd+1](low) and pos>=0 then
    
    If idx1 <> 0 then
    idx2 = idx1
    Endif
    
    If idx0 <> 0 then
    idx1 = idx0
    Endif
    
    idx0 = barindex[prd]
    pos=-1
    
    If idx2<>0 then
    
    //If showPvts then
    //If Low[barindex-idx0]>=Low[barindex-idx2] then
    //DRAWTEXT("HL",idx0,Low[barindex-idx0]-ATR/2,Dialog,Bold,20) coloured(0,200,0,255)
    //else
    //DRAWTEXT("LL",idx0,Low[barindex-idx0]-ATR/2,Dialog,Bold,20) coloured(0,200,0,255)
    //Endif
    //Endif
    Endif
    
    Endif
    
    If idx2<>0 then
    If pos=1 and High[barindex-idx0]>Low[barindex-idx1] and High[barindex-idx0]<High[barindex-idx2] and (Close<Low[barindex-idx1] and open>Low[barindex-idx1]) then
    
    //If showPattern then
    //DRAWTEXT("1",idx2,High[idx2]+ATR[Barindex-Idx2]/2,Dialog,Bold,20) coloured("BLUE",255)
    //DRAWTEXT("2",idx1,Low[barindex-idx1]-ATR[Barindex-Idx1]/2,Dialog,Bold,20) coloured("BLUE",255)
    //DRAWTEXT("3",idx0,High[barindex-idx0]+ATR[Barindex-Idx0]/2,Dialog,Bold,20) coloured("BLUE",255)
    //DRAWSEGMENT(idx2,High[barindex-idx2],idx1,Low[barindex-idx1]) STYLE(Line,3) coloured("BLUE",255)
    //DRAWSEGMENT(idx1,Low[barindex-idx1],idx0,High[barindex-idx0]) STYLE(Line,3) coloured("BLUE",255)
    //Endif
    //
    //If showBreak then
    //DRAWSEGMENT(idx1,Low[barindex-idx1],barindex+1,Low[barindex-idx1]) STYLE(DOTTEDLINE2,2) coloured("BLUE",255)
    //DRAWARROWDOWN(barindex,High+ATR/2) coloured("RED",255)
    //Endif
    
    signal=-1
    
    Endif
    
    If pos=-1 and Low[barindex-idx0]<High[barindex-idx1] and Low[barindex-idx0]>Low[barindex-idx2] and (Close>High[barindex-idx1] and open<High[barindex-idx1]) then
    //
    //If showPattern then
    //DRAWTEXT("1",idx2,Low[barindex-idx2]-ATR[Barindex-Idx2]/2,Dialog,Bold,20) coloured("BLUE",255)
    //DRAWTEXT("2",idx1,High[barindex-idx1]+ATR[Barindex-Idx1]/2,Dialog,Bold,20) coloured("BLUE",255)
    //DRAWTEXT("3",idx0,Low[barindex-idx0]-ATR[Barindex-Idx0]/2,Dialog,Bold,20) coloured("BLUE",255)
    //DRAWSEGMENT(idx2,Low[barindex-idx2],idx1,High[barindex-idx1]) STYLE(Line,3) coloured("BLUE",255)
    //DRAWSEGMENT(idx1,High[barindex-idx1],idx0,Low[barindex-idx0]) STYLE(Line,3) coloured("BLUE",255)
    //Endif
    
    //If showBreak then
    //DRAWSEGMENT(idx1,High[barindex-idx1],barindex+1,High[barindex-idx1]) STYLE(DOTTEDLINE2,2) coloured("BLUE",255)
    //DRAWARROWUP(barindex,Low-ATR/2) coloured("GREEN",255)
    //Endif
    signal = 1
    
    Endif
    Endif
    endif
    
    screener[signal<>0](signal)
    
    francis59 thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

créer un screener basé sur 1-2-3 pattern


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
francis59 @francis51 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
3 years ago.

Topic Details
Forum: ProScreener : Scanners de Marché & Détection
Language: French
Started: 09/08/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...