time schedule to close all positions

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #161348 quote
    kevin12345kevin12345
    Participant
    Average

    hi,

    how do I code all open positions close on Saturday at 10:45?

    thank you.

    #161350 quote
    VonasiVonasi
    Moderator
    Master
    if opendayofweeek = 6 and time = 104500 then
    sell at market
    exitshort at market
    endif

    You will have to ensure that your strategy trades on a timeframe that has a 104500 candle such as 15 minute time frame.

    Also markets are closed on a Saturday so there will be no Saturday candles so the Saturday condition cannot be met.

    Nicolas thanked this post
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

time schedule to close all positions


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
kevin12345 @kevin12345 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by VonasiVonasi
5 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/13/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...