Figer le barindex d'une bougie

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #45041 quote
    CarlCarl
    Participant
    Average

    Ci-dessous une demande qui a été envoyée à ProRealTime :

    Bonjour

    Je souhaiterais figer le Barindex d’une bougie afin de l’affecter à l’ordre d’une bougie (Ex Close N° figé]

    Exemple

    Cond1 = Close > 1,3551

    IF Cond1 THEN
    A = Barindex
    ENDIF

    Le problème est que mon Barindex va évoluer avec le temps

    En admettant que quand ma condition est vérifiée,j’ai A = Barindex = 75
    La bougie suivante, je vais avoir 76 et ainsi de suite
    Je voudrais toujours pouvoir faire référence à la bougie qui a vérifié ma condition,meme 15 bougies après
    Ex-
    Cloture à 1,3551
    Je veux prendre position à l’achat 2 pips en dessous à 1,3549 et ce jusque au plus 15 bougies max apres
    Ensuite l’ordre est caduque

    En vous remerciant et en espérant avoir été assez clair
    Cordialement
    Et une proposition de réponse :

    nbbars=15
    nbpips=2
    price=1.3551
    Cond1 = Close > price
    
    IF Cond1 THEN
    A = Barindex
    ENDIF
    
    if not onmarket and A > tradeindex and barindex-A <nbbars then
    buy 1 share at price-nbpips*pointsize limit
    endif

     

     

Viewing 1 post (of 1 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

Figer le barindex d'une bougie


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Carl @carl Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/31/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...