Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Actual Close price wanted

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

    Actual Close price wanted

    I'm creating a new indicator based on PriorDayOHLC.Close.

    The value of Close changes depending on Session end time, when I use my new indicator in a strategy.

    If I set the Session end time to the actual end time of the index, the return value is fine.

    But when I set the Session end time to the time where I want to stop trading that index, I get the high value reached by that timestamp. That of course is a different value.

    #2
    PriorDayOHLC will always return values based on your chart data. If your charting a lot of pre-market/after market data your close will be reflective of this. If you are chopping out the session your returns will be influenced as well.

    What I recommend since you are ultimately using a strategy is to use multi-time frame strategies and add a Daily bar object. Migrate all your logic that needs to be based on this value over to the strategy. Then just reference the daily bar object to get yesterday's close.

    Alternatively, you can also try just using a time filter instead of actually changing the chart's session begin/end times. This will limit your trading and will also allow you the flexibility to get accurate PriorDayOHLC values. Please see this reference sample: http://www.ninjatrader-support.com/v...ead.php?t=3226
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    577 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 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
    553 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X