DayOfWeek / Trading from Tuesday to Friday

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22710 quote
    RoLaDay
    Participant
    Average

    Hello everybody,

    I wonder how I can trade from Tuesday to Friday.

    I only found out how to trade e.g. on Tuesday (dayofweek= 2) but not how to trade from Tuesday – Friday.

    Thanks a lot!

    #22719 quote
    4everTrading
    Participant
    Senior

    Hello there

    I think the best option the choose the days you’d like to trade it should be something like this.

    Regards

    #Haveagoodweekend

    
    
    if dayofweek=1 then //Monday
    daytrading=0
    endif
    if dayofweek=2 then // Tuesday
    daytrading=1
    endif
    if dayofweek=3 then // Wednesday
    daytrading=1
    endif
    if dayofweek=4 then //Thursday
    daytrading=1
    endif
    if dayofweek=5 then // Friday
    daytrading=1
    endif
    
    // In the condition makes reference to the dayofweek=x
    IF  daytrading= 1  AND "condition2" THEN
     ......
    ENDIF
    
    #22723 quote
    RoLaDay
    Participant
    Average

    Works great! Thanks a lot and have a nice weekend too 🙂

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

DayOfWeek / Trading from Tuesday to Friday


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
RoLaDay @roladay Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/27/2017
Status: Active
Attachments: No files
Logo Logo
Loading...