closing for the weekend

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #114884 quote
    nonethelessnonetheless
    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
    VonasiVonasi
    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.
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

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 VonasiVonasi
6 years, 9 months ago.

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