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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        556 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X