Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reset Internal Bars on New Day

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

    Reset Internal Bars on New Day

    Hi,

    I am trying to setup a Strategy that operates each day with no historical data from prior days. I do back-tests and it is clear it is using the previous days bars to calculate the VMA. For example, I am using the following:
    VMA(period, volatilityPeriod)

    I would like it to reset the bars as if it was the 1st day each day. I don't exactly know how to do that easily. I have considered something more along the lines of this to implement the concept:
    VMA(Math.Min(period,Bars.BarsSinceSession), Math.Min(volatilityPeriod,Bars.BarsSinceSession))

    This would be a lot of work to change through-out the code and I don't think the VMA Indicator overlayed on the graph will reflect this re-calculation. Is there an easy way to do this for a strategy, is this only a side-affect of backtesting?

    Thanks

    #2
    NJA_MC, this would unfortunately not be possible without custom coding - to test if your approach has merit to explore this further you could work with Historical in Market Replay to simulate starting with a 'fresh' VMA each day.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    631 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    566 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X