closing for the weekend

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #114884 quote
    nonetheless
    Participant
    Master

    Hello all, under daysForbiddenEntry how do I stipulate closing at 21:00 on Friday and reopening at 23:00 on Sunday?

    #114890 quote
    Vonasi
    Moderator
    Master

    You can do something like this:

    if opendayofweek = 5 and time = 210000 then
    sell at market
    exitshort at market
    tradesok = 0
    endif
    
    if opendayofweek = 0 and time = 230000 then
    tradesok = 1
    endif
    
    if tradesok and (your entry conditions) then
    buy 1 contract at market
    endif
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

closing for the weekend


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Vonasi
6 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/14/2019
Status: Active
Attachments: No files
Logo Logo
Loading...