coder une zone d’exclusion

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #197739 quote
    fxbravofxbravo
    Participant
    Average

    Bonjour,

     

    Je demande votre aide pour coder une zone d’exclusion.

     

    Voici mon besoin:

    Un trade à l’achat se déclenche (sur UT 1min par ex) à 10h12 à un prix de 10000.

    Le trade se ferme à 10111 le jour même à 18h37 après être passé par un pic à 10156.

    Je souhaite exclure pendant 48h (à partir de la prise de position de 10H12) la zone 10000-10156.

    Je suis certains que c’est très simple, mais j’avoue buter sur le code!

     

    Merci d’avance pour votre retour.

    Excellente journée.

    #197886 quote
    NicolasNicolas
    Keymaster
    Legend

    En testant si on est au marché, on enregistre le plus haut et le plus bas atteint.

    //reset dés l'ouverture d'un nouveau trade
    if longtriggered or short triggered then 
     hh=high
     ll=low
    endif
    
    //enregistrement de la zone d'exclusion
    if onmarket then 
     hh=max(hh,high)
     ll=min(ll,low)
    endif

    Dans cet exemple, hh étant le seuil haut et ll le seuil bas de ta zone d’exclusion, à tester au moment de la prise de position si le prix courant est compris dedans ou pas.

    #197889 quote
    fxbravofxbravo
    Participant
    Average

    Salut Nicolas,

     

    Merci beaucoup!

     

    Belle journée.

Viewing 3 posts - 1 through 3 (of 3 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

coder une zone d’exclusion


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
fxbravo @fxbravo Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by fxbravofxbravo
4 years, 3 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 07/22/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...