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 CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    17 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    182 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    335 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    259 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X