Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CurrentDayOHL problem

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

    CurrentDayOHL problem

    Hello, I live in Kiev(GMT+2) and I have a problem with CurrentDayOHL().
    It show OHL values from 16:30 (GMT +2) till now. But GLOBEX is working ~24h.
    I need OHL prices from start till now. It start working at 01:00AM(GMT+2)!
    How can I get real OHL values from 01:00AM (GMT+2) till Now?

    Code:
    protected override void OnBarUpdate()
            {
                if(!Historical)
                {
                    double high = CurrentDayOHL().CurrentHigh[0];
                    double low = CurrentDayOHL().CurrentLow[0];
                    double open = CurrentDayOHL().CurrentOpen[0];
                    
                    
                    Print(String.Format("low {0}    high {1}    open {2}    BID {3}   ASK {4}    ", low, high, open, GetCurrentBid(),  GetCurrentAsk()));
                }
            }

    #2
    Hello Alex and welcome to our forums here - what session template do you use on your chart? The indicator would work according to the session time defined by this template, so if you need custom hours then just define yourself the needed template under Tools > Session Manager in NT and then use this template for creating the chart / bars series where you then apply the indicator using this method.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    59 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    283 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X