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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X