Exclusion de jours

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #78079 quote
    Djoker02
    Participant
    New

    Bonjour,

    J’aimerais ne backtester une stratégie que sur le lundi et le vendredi. J’essaie de créer un indicateur qui me ressort 1 quand on est sur ces jours-ci et 0 sinon.

    if (currentdayofweek = 1) or (currentdayofweek = 5) then
    indic = 1
    else
    indic = 0
    endif
    
    return indic

    Mais cela ne fonctionne pas… Pouvez-vous me donner un coup de main svp ?

    PS : je ne suis pas en timeframe journalier !

    #78298 quote
    Nicolas
    Keymaster
    Master

    Je pense qu’il faudrait utiliser DayOfWeek plutôt !

    #78437 quote
    Djoker02
    Participant
    New

    Merci bcp !

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Exclusion de jours


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Djoker02 @djoker02 Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 08/13/2018
Status: Active
Attachments: No files
Logo Logo
Loading...