Nombre de bougies depuis l'ouverture d'une position

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #109262 quote
    Edmond
    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
    Nicolas
    Keymaster
    Master

    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
    Edmond
    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.

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 Edmond
6 years, 5 months ago.

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