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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X