Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BUG: PriorDayOHLC, doesn't work on Mondays.

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

    BUG: PriorDayOHLC, doesn't work on Mondays.

    Summary
    The PriorDayOHLC values are always zero on a monday. This is because it is using Sundays data for its calculation & there is no data.
    NB: It may be possible that this indicator works correctly in USA for USA markets as they have no data on Saturday. If so, test this by setting your system clock to a different timemzone. (try really east like Australia or New Zealand)

    Detail
    There is an implicit assumption in many of Ninja indicators that the market is open 7 * 24 hrs. I've noticed that this creates many bugs where :-
    i) the market closes over the weekend. or
    ii) the market closes for more than 15 mins. ie Euro Stoxx or
    iii) the market Opens & Closes on different calendar dates. (very common when your local timezone is not USA.

    In this case PriorDayOHLC is looking at Calendar Days not Trading days. (Actually it is looking at the undocumented "CurrrentDate" but the effect is the same.)

    As Friday's EuroStoxx session closes at Sat 8:15am (AEDT) & Opens Monday 6pm (AEDT). This causes the PriorDayOHLC prices to all become PriorClose.
    Making this indicator useless on a Monday & very dangerous to use in any of your own indicators.

    Workaround
    I keep a IntSeries called SessionCount which starts at 1, it holds the same value for all candles until Bars.FirstBarOfSession = true. When I increment the SessionCount by one.

    This lets me use the index of any two bars to see if they are also in the same trading session. It also avoids counting non-trading days like Public Holidays & weekends.

    I hope this helps
    Dave
    Last edited by David Lean; 01-23-2010, 09:51 PM.

    #2
    Hello,

    I will send your suggestion to our development team for consideration, thanks!
    DenNinjaTrader Customer Service

    Comment


      #3
      Prior OHLC

      David

      I see where you are coming from but my experience on the Dax/EuroStoxx futures is that it works fine on a Monday?(In 7beta6)
      Maybe they fixed it?

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by xiinteractive, 04-09-2024, 08:08 AM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by Johnny Santiago, 10-11-2019, 09:21 AM
      95 responses
      6,193 views
      0 likes
      Last Post xiinteractive  
      Started by Irukandji, Today, 09:34 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by RubenCazorla, Today, 09:07 AM
      1 response
      6 views
      0 likes
      Last Post RubenCazorla  
      Started by TraderBCL, Today, 04:38 AM
      3 responses
      26 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X