Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PriorDayOHLC indicator

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

    PriorDayOHLC indicator

    I am working with the PriorDayOHLC indicator currently. I have some chart using US ETH trading hours, but looking to plot the prior day RTH closing price. I have done the following so far. It works, but the prior day close price is showing after bar closes. What is way to put in dataloaded area so it shows when chart is started?

    added this:

    protected override void OnMarketData(Data.MarketDataEventArgs marketDataUpdate)
    {
    priorDayClose = marketDataUpdate.Instrument.MarketData.LastClose.P rice;
    }​

    removed this

    //priorDayClose = currentClose;

    #2
    Hello metical1,

    Are you referring to the first bar of the session and after that closes?

    Comment


      #3
      Hi Jesse. Once i start up the chart or load a new ticker it wont load that particular number (prior day RTH close price) until the current bar closes. I took the marketDataUpdate.Instrument.MarketData.LastClose.P rice from the net change display indicator and that one calculates on price change. So that would be one option, but I was hoping there is a way to load it on state = data loaded because it only needs to load the price once.

      Comment


        #4
        Hello metical1,

        Indicators cannot be used from DataLoaded, you need to wait for bars to process so they can populate their data. Your logic should also be in OnBarUpdate.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        50 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        69 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        36 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        97 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        60 views
        0 likes
        Last Post PaulMohn  
        Working...
        X