Fichier OPR : recherche et import dans ProRealTime

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #260172 quote
    philippe noury
    Participant
    Junior

    bonjour

    je recherche le fichier OPR pour importer dans la plateforme

    quelqu’un peut il m aider?

    dans l ‘attente merci

    #260174 quote
    Nicolas
    Keymaster
    Legend

    Bonjour,

    J’aimerai bien vous aider, mais je ne vois pas de quel fichier il peut s’agir, OPR signifiant Open Range Breakout, il y a multitudes de sujets et de codes qui se rapportent à ce type de stratégies, sous la forme d’indicateur ou de code de trading automatique.

    Pour commencer, vous pouvez utiliser l’outil de recherche et taper “OPR” pour voir ce qui pourrait vous convenir ?

    Search

    #260184 quote
    Nicolas
    Keymaster
    Legend

    Voici un code d’indicateur pour tracer l’OPR du jour:

    // OPR - Opening Price Range 15min - Jour en cours uniquement
    DEFPARAM drawonlastbaronly = true
    
    sessionStart  = 090000   // Heure de début OPR (modifier selon votre marché)
    sessionOPRend = 091500   // Heure de fin OPR (début + 15 minutes)
    
    // On ne traite que les bougies appartenant à la journée en cours
    todayOPR = date = date[0] and time >= sessionStart and time < sessionOPRend
    
    if todayOPR and not todayOPR[1] then
       startBar = barindex
       oprHigh  = high
       oprLow   = low
    endif
    
    if todayOPR then
       endBar  = barindex
       oprHigh = max(oprHigh, high)
       oprLow  = min(oprLow, low)
    endif
    
    if islastbarupdate and startBar > 0 then
       // Rectangle bleu semi-transparent sur la zone OPR
       drawrectangle(startBar, oprHigh, endBar, oprLow) coloured(0, 120, 255, 50) bordercolor("cyan")
       // Ligne haute en vert prolongée jusqu'à la barre actuelle
       drawsegment(startBar, oprHigh, barindex, oprHigh) coloured(0, 200, 80, 220)
       // Ligne basse en rouge prolongée jusqu'à la barre actuelle
       drawsegment(startBar, oprLow, barindex, oprLow) coloured(220, 50, 50, 220)
    endif
    
    return
    

    Pensez à adapter sessionStart et sessionOPRend si vous tradez un marché avec une ouverture différente (ex: 080000 / 081500 pour le forex, 153000 / 153000+15 pour les indices US).

    indicateur-OPR-prorealtime.png indicateur-OPR-prorealtime.png
    #261796 quote
    Bateson
    Participant
    Junior

    Merci beaucoup Nicolas.

    Serait-il possible de tracer au fur et à mesure les niveaux de fibos à l’intérieur de l’OPR 15mn et les extensions qui se prolongent jusqu’à la fin de la session ?

    Merci d’avance 🙂

    #261810 quote
    Nicolas
    Keymaster
    Legend

    Voici ce qui a été ajouté et comment ça fonctionne :

    • sessionEnd capture la dernière bougie de la journée via la variable lastSessionBar, mise à jour bougie par bougie tant qu’on est après l’OPR et avant la fin de session. C’est ce qui permet aux lignes de se prolonger au fur et à mesure, puis de s’arrêter proprement à la clôture.
    • Les retracements internes (0%, 23.6%, 38.2%, 50%, 61.8%, 76.4%, 100%) partent du début de l’OPR (startBar) et s’étendent jusqu’à lastSessionBar. Le 50% est en trait plein légèrement plus épais, les autres en pointillés.
    • Les extensions haussières (127.2% à 261.8%) et baissières (-27.2% à -161.8%) partent de la fin de l’OPR (endBar) pour ne pas surcharger visuellement la zone OPR elle-même.
    • Les labels DRAWTEXT sont placés en fin de ligne à extEnd pour rester lisibles en bord droit du graphique.
    • À adapter : sessionEnd = 173000 pour votre marché (ex. 220000 pour le Nasdaq en heure de Paris).


    // OPR - Opening Price Range 15min + Niveaux Fibonacci
    // Retracements internes + Extensions haussières et baissières
    DEFPARAM drawonlastbaronly = true
    
    
    sessionStart  = 090000   // Début OPR (adapter à votre marché)
    sessionOPRend = 091500   // Fin OPR (début + 15 minutes)
    sessionEnd    = 173000   // Fin de session (adapter à votre marché)
    
    
    todayDate = date[0]
    todayOPR  = (date = todayDate) and time >= sessionStart and time < sessionOPRend
    afterOPR  = (date = todayDate) and time >= sessionOPRend and time <= sessionEnd
    
    
    // Capture du range OPR
    if todayOPR and not todayOPR[1] then
        startBar = barindex
        oprHigh  = high
        oprLow   = low
    endif
    
    
    if todayOPR then
        endBar  = barindex
        oprHigh = max(oprHigh, high)
        oprLow  = min(oprLow, low)
    endif
    
    
    // Suivi de la dernière bougie de la session (pour prolonger les lignes)
    if afterOPR then
        lastSessionBar = barindex
    endif
    
    
    if islastbarupdate and startBar > 0 then
        oprRange = oprHigh - oprLow
    
    
        // --- Retracements internes à l'OPR ---
        fib000 = oprLow
        fib236 = oprLow + 0.236 * oprRange
        fib382 = oprLow + 0.382 * oprRange
        fib500 = oprLow + 0.500 * oprRange
        fib618 = oprLow + 0.618 * oprRange
        fib764 = oprLow + 0.764 * oprRange
        fib100 = oprHigh
    
    
        // --- Extensions haussières (au-dessus du High OPR) ---
        fibExt1272up = oprHigh + 0.272 * oprRange
        fibExt1414up = oprHigh + 0.414 * oprRange
        fibExt1618up = oprHigh + 0.618 * oprRange
        fibExt2000up = oprHigh + 1.000 * oprRange
        fibExt2618up = oprHigh + 1.618 * oprRange
    
    
        // --- Extensions baissières (en-dessous du Low OPR) ---
        fibExt1272dn = oprLow - 0.272 * oprRange
        fibExt1414dn = oprLow - 0.414 * oprRange
        fibExt1618dn = oprLow - 0.618 * oprRange
        fibExt2000dn = oprLow - 1.000 * oprRange
        fibExt2618dn = oprLow - 1.618 * oprRange
    
    
        extEnd = lastSessionBar
    
    
        // --- Rectangle OPR (fond bleu semi-transparent) ---
        drawrectangle(startBar, oprHigh, endBar, oprLow) coloured(0, 120, 255, 40) bordercolor("cyan")
    
    
        // --- Retracements : tracés depuis le début de l'OPR jusqu'à la fin de session ---
        drawsegment(startBar, fib000, extEnd, fib000) coloured(220, 50, 50, 220) style(dottedline, 1)
        drawtext("0%", extEnd, fib000, Dialog, Bold, 10) coloured(220, 50, 50, 220)
    
    
        drawsegment(startBar, fib236, extEnd, fib236) coloured(200, 200, 0, 200) style(dottedline, 1)
        drawtext("23.6%", extEnd, fib236, Dialog, Bold, 10) coloured(200, 200, 0, 220)
    
    
        drawsegment(startBar, fib382, extEnd, fib382) coloured(0, 200, 80, 220) style(dottedline, 1)
        drawtext("38.2%", extEnd, fib382, Dialog, Bold, 10) coloured(0, 200, 80, 220)
    
    
        drawsegment(startBar, fib500, extEnd, fib500) coloured(100, 180, 255, 220) style(line, 2)
        drawtext("50%", extEnd, fib500, Dialog, Bold, 10) coloured(100, 180, 255, 220)
    
    
        drawsegment(startBar, fib618, extEnd, fib618) coloured(0, 200, 80, 220) style(dottedline, 1)
        drawtext("61.8%", extEnd, fib618, Dialog, Bold, 10) coloured(0, 200, 80, 220)
    
    
        drawsegment(startBar, fib764, extEnd, fib764) coloured(200, 200, 0, 200) style(dottedline, 1)
        drawtext("76.4%", extEnd, fib764, Dialog, Bold, 10) coloured(200, 200, 0, 220)
    
    
        drawsegment(startBar, fib100, extEnd, fib100) coloured(220, 50, 50, 220) style(dottedline, 1)
        drawtext("100%", extEnd, fib100, Dialog, Bold, 10) coloured(220, 50, 50, 220)
    
    
        // --- Extensions haussières : partent de la fin de l'OPR ---
        drawsegment(endBar, fibExt1272up, extEnd, fibExt1272up) coloured(255, 140, 0, 200) style(dottedline, 1)
        drawtext("127.2%", extEnd, fibExt1272up, Dialog, Bold, 10) coloured(255, 140, 0, 220)
    
    
        drawsegment(endBar, fibExt1414up, extEnd, fibExt1414up) coloured(255, 100, 0, 200) style(dottedline, 1)
        drawtext("141.4%", extEnd, fibExt1414up, Dialog, Bold, 10) coloured(255, 100, 0, 220)
    
    
        drawsegment(endBar, fibExt1618up, extEnd, fibExt1618up) coloured(255, 60, 0, 220) style(line, 2)
        drawtext("161.8%", extEnd, fibExt1618up, Dialog, Bold, 10) coloured(255, 60, 0, 220)
    
    
        drawsegment(endBar, fibExt2000up, extEnd, fibExt2000up) coloured(255, 0, 180, 200) style(dottedline, 1)
        drawtext("200%", extEnd, fibExt2000up, Dialog, Bold, 10) coloured(255, 0, 180, 220)
    
    
        drawsegment(endBar, fibExt2618up, extEnd, fibExt2618up) coloured(200, 0, 255, 200) style(dottedline, 1)
        drawtext("261.8%", extEnd, fibExt2618up, Dialog, Bold, 10) coloured(200, 0, 255, 220)
    
    
        // --- Extensions baissières : partent de la fin de l'OPR ---
        drawsegment(endBar, fibExt1272dn, extEnd, fibExt1272dn) coloured(255, 140, 0, 200) style(dottedline, 1)
        drawtext("-27.2%", extEnd, fibExt1272dn, Dialog, Bold, 10) coloured(255, 140, 0, 220)
    
    
        drawsegment(endBar, fibExt1414dn, extEnd, fibExt1414dn) coloured(255, 100, 0, 200) style(dottedline, 1)
        drawtext("-41.4%", extEnd, fibExt1414dn, Dialog, Bold, 10) coloured(255, 100, 0, 220)
    
    
        drawsegment(endBar, fibExt1618dn, extEnd, fibExt1618dn) coloured(255, 60, 0, 220) style(line, 2)
        drawtext("-61.8%", extEnd, fibExt1618dn, Dialog, Bold, 10) coloured(255, 60, 0, 220)
    
    
        drawsegment(endBar, fibExt2000dn, extEnd, fibExt2000dn) coloured(255, 0, 180, 200) style(dottedline, 1)
        drawtext("-100%", extEnd, fibExt2000dn, Dialog, Bold, 10) coloured(255, 0, 180, 220)
    
    
        drawsegment(endBar, fibExt2618dn, extEnd, fibExt2618dn) coloured(200, 0, 255, 200) style(dottedline, 1)
        drawtext("-161.8%", extEnd, fibExt2618dn, Dialog, Bold, 10) coloured(200, 0, 255, 220)
    
    
    endif
    
    
    return
    
    OPR-fibo.png OPR-fibo.png
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Fichier OPR : recherche et import dans ProRealTime


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by Nicolas
1 week, 4 days ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/13/2026
Status: Active
Attachments: 2 files
Logo Logo
Loading...