Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What is the best way to refer to the date for the strategy input?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What is the best way to refer to the date for the strategy input?

    I am a discretionary trader using a strategy to enter my trades.

    Each day I manually input two prices that the strategy uses to trade.

    For the purposes of backtesting/optimization I would like to be able to input those two prices for a series of days.

    What is the best way to do this?

    One way I came across while searching was to use the day of the year (where the first day of the calendar year is 1), but I wanted to create this post to see if that was truly the best way to go about this or if there is a more efficient solution.

    #2
    Hello WalterSkinner,

    Yes that would likely be an easy way to do that. You could make a list or array of prices and then use the day of the year as the index. Other ways would likely involve more code such as working with times or dates/loading data from file.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    31 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X