Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Outside of OnBarUpdate?

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

    Outside of OnBarUpdate?

    I want to do the following:

    Compare the low of a daily bar series to the low of a weekly bar series (Add(PeriodType.Week, 1)) and if they are ==, retrieve the day of the week of the Low of the daily bar series.

    Doing this within the OnBarUpdate method is complicated since I cannot access the Low of the week until the week is over (i want to complete this as a study, rather than a trading strategy, so I don't care if i am accessing information from 'the future')

    I guess completing this would mean accessing arrays of price data inside a custom method? Is this possible?

    As always, help is much appreciated.

    #2
    Space123, unfortunately it's not supported to access future data points - for backtesting you're correct, you would need to simulate the weekly frame then with the daily granularity to be able to compare those two on the same OnBarUpdate() call. For realtime use, you would let the strategy run on CalculateOnBarClose = false to get updates on each tick to those values...

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    627 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    359 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
    562 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    567 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X