Calcul variable sur une période

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #127016 quote
    Victor5Victor5
    Participant
    Senior

    Bonjour,

    J’ai cherché sur le forum mais je n’ai pas trouvé ce type de calcul

    Je recherche à calculer durant une période (entre 8 heures et 12 heures) les données suivantes :

    Le plus haut, le plus bas et la close (un sorte de calcul de pivot). Donc le tout sera divisé par 3

    Je souhaiterai que le calcul se fasse sur l’UT 1 minute (et autres UT) et par conséquent le calcul change toute les minutes (en raison de la variable close) pendant cette tranche horaire.

    Evidemment, le nombre de bougies augmente en fonction du temps qui avance

    Merci

    #127024 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Voilà (non testé):

    If time = 080000 Then
       MaxHI = high
       MinLO = low
    Endif
    If time >= 080000 and time <= 120000 then
       MaxHI        = max(MaxHI,high)
       MinLO        = min(MinLO,low)
       ClosingPrice = close
       Price        = (MaxHI + MinLO + ClosingPrice) / 3
    Endif
    Return Price as “Price”
    #127029 quote
    Victor5Victor5
    Participant
    Senior

    Roberto,

     

    Je viens de tester et cela fonctionne

     

    Merci beaucoup

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

Calcul variable sur une période


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Victor5 @lucky5 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Victor5Victor5
6 years, 5 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/20/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...