• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 dshalom9, Today, 08:36 AM
    9 responses
    8 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by stock_wizard_49, 07-11-2020, 06:57 PM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by asmmbillah, Yesterday, 03:03 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by AspenHiker, Today, 08:37 AM
    0 responses
    5 views
    0 likes
    Last Post AspenHiker  
    Started by StarTrader, 07-11-2020, 11:27 AM
    2 responses
    19 views
    0 likes
    Last Post StarTrader  
    Working...
    X