Trading Times

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32268 quote
    deletedaccount14122020
    Participant
    New

    Hello,

    I would appreciate any advice on the following:

    I want to stipulate trading times in my system as follows:

    SUNDAY – DO NOT TRADE

    MONDAY – TRADE AFTER 10.59AM

    TUESDAY – FRIDAY – TRADE ALL DAY

    I have entered the following code:

    ValidTime = (CurrentDayOfWeek <> 0 OR 1)
    MondayValidTime = (CurrentDayOfWeek = 1 ) AND ((TIME > 105900))
    SundayValidTime = (CurrentDayOfWeek = 0 ) AND ((Time > 235900))
    
    once TradeTime = 1
    
    IF ValidTime OR MondayValidTime OR SundayValidTime THEN
    TradeTime = 1
    ELSE
    TradeTime = 0
    ENDIF

    I then have a condition set to TradeTime = 1 in my rules.

    This does not appear to be working…..

    Many thanks

    #32269 quote
    Elsborgtrading
    Participant
    Veteran

    try this

    ValidTime = (CurrentDayOfWeek <> (0 OR 1))
    SundayValidTime = (CurrentDayOfWeek = 7 ) AND ((Time > 235900))
    
    Nicolas thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Trading Times


ProOrder: Automated Strategies & Backtesting

New Reply
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Elsborgtrading
8 years, 10 months ago.

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