Trading Day of Month

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #184985 quote
    814591
    Participant
    New

    Got it – Many Thx

    #185212 quote
    robertogozzi
    Moderator
    Master

    You can use the MTF (Multiple, or Multi,  Time Frame) support that enables you to use more than one timeframe. In this case you need to write the code you want to be executed only once per day just below the DAILY Timeframe,the rest must be written is the DEFAULT Timeframe which must be no higher than 1-hour to match the time used (220000) and must be the timeframe used in your chart:

    Timeframe(Daily,UpdateOnClose)
     .
     .
     .
     .
    
    Timeframe(Default)
    //Set Buy- and SellTime
    BuyTime = 0
    SellTime = 0
    //Set Entry date
    
    IF (date = 20210113) and (time=220000) Then
       BuyTime = 1
    ENDIF
    
    IF (date = 20210118) and (time=220000) Then
       SellTime = 1
    ENDIF

    you can learn more about MTF, searching MTF in this forum; you will be returned tens of links to examples, articles, blogs and code snippets.

Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.

Trading Day of Month


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Thally @rodger_dodger Participant
Summary

This topic contains 16 replies,
has 2 voices, and was last updated by robertogozzi
4 years, 1 month ago.

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