Exclusion de jours

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #78079 quote
    Djoker02Djoker02
    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
    NicolasNicolas
    Keymaster
    Legend

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

    #78437 quote
    Djoker02Djoker02
    Participant
    New

    Merci bcp !

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

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 Djoker02Djoker02
8 years, 1 month ago.

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