Nombre de bougies depuis l'ouverture d'une position

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #109262 quote
    EdmondEdmond
    Participant
    Veteran

    Bonjour à tous,

    Je cherche à identifier le point haut depuis l’ouverture d’une position.  Le problème c’est que je ne parviens pas à déterminer depuis quand la position est ouverte, sachant que la prise de position n’intervient pas à heure fixe.

    if longonmarket then
    period=N //N désigne le nombre de bougies depuis l'ouverture de position
    hh = highest[period](high)
    endif

    Auriez-vous une idée? Merci par avance de votre aide!

    #109264 quote
    NicolasNicolas
    Keymaster
    Legend

    La bougie d’ouverture d’une position est TRADEINDEX.

    Donc tu peux faire en effet utiliser Highest, avec une période dynamique comme ceci : (à tester)

    hh= highest[max(1,barindex-tradeindex)](high)

    ou avec un calcul temps réel du prix le plus haut observé en partant de TRADEPRICE (à tester aussi)

    if longonmarket then
     hh = max(tradeprice,max(hh,high))
    endif
    Edmond thanked this post
    #109273 quote
    EdmondEdmond
    Participant
    Veteran

    Super, merci beaucoup Nicolas ! Je testerai.

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

Nombre de bougies depuis l'ouverture d'une position


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
Edmond @antoine130 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by EdmondEdmond
7 years, 1 month ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 10/04/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...