• 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

PriorDayOHLC and prices

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

  • VV Cephei
    started a topic PriorDayOHLC and prices

    PriorDayOHLC and prices

    Hello,

    I'd like to get the value, for example, of the NQ or ES at 4:00pm EST yesterday, and compare it to the value at the open 9:30am EST this morning. I know using the PriorDayOHLC will return values from different times than the ones I'd like.

    I suppose I could compare the open[0] to close[900] or how many ever bars ago, but I'm sure that's an inefficient way of doing it. Is there a simpler way of doing it? Thank you for your help!

  • Harry
    replied
    Originally posted by VV Cephei View Post
    Thanks Harry for the idea as well as posting that chart.

    I was wondering if someone could help or clear something up for me with the suggestion that Harry made.

    I tried to create a template by going to tools>session manager then I try to change it from the 24/7 default setting. I put it to US Equities RTH. But what's strange is that when I go back into Tools>Session Manager I see that 24/7 default is selected. And it doesn't seem to matter if I change it back or not, each time I go back to session manager it appears that my selection doesn't stay for some reason. I even made my own template and saved it under a name, but when I select it the same thing happens. Once I come back in, the default 24/7 appears to be selected.
    You do not select session templates within the session manager. The session manager is only used to build and store session templates.

    You select the session template when you open a new chart or for existing charts under DataSeries settings. Please be aware that any chart template that you select overrides the session template settings.

    Leave a comment:


  • VV Cephei
    replied
    Thanks Harry for the idea as well as posting that chart.

    I was wondering if someone could help or clear something up for me with the suggestion that Harry made.

    I tried to create a template by going to tools>session manager then I try to change it from the 24/7 default setting. I put it to US Equities RTH. But what's strange is that when I go back into Tools>Session Manager I see that 24/7 default is selected. And it doesn't seem to matter if I change it back or not, each time I go back to session manager it appears that my selection doesn't stay for some reason. I even made my own template and saved it under a name, but when I select it the same thing happens. Once I come back in, the default 24/7 appears to be selected.

    Leave a comment:


  • Harry
    replied
    You can apply a session template to your chart which isolates the regular session within the full session. This allows you to catch the regular open (open of the first bar of the session) and the regular close (close of the last bar of the session). It is better to use the settlement price instead of the regular close. The settelement price can only be taken from daily data, if supplied by your data provider.

    The chart below catches the settlement price from daily Kinetick data and compares it to the open of today's session. The difference is displayed as gap. The gap remains on the chart until it is closed durgin the regular session.

    Today's new gap was insignificant, as today's regular open (4324.50) was only 1 tick below yesterday's settlement price (4324.75). However, there were two open gaps on the chart from February 12 and March 12. Both were closed during the first 3 hours of the regular session.
    Attached Files

    Leave a comment:


  • VV Cephei
    replied
    Hi there, thanks for your help.

    I'm still having some problems, so I attached sample so you could see if I'm on the right track:

    if (Bars.FirstBarOfSession == true)
    {
    double PrevDayClose = Close[0];
    }

    // condition
    if (Open[0] - PrevDayClose > 5 && ToTime(Time[0]) == ToTime(9, 30, 0))
    {
    EnterLong(DefaultQuantity, "");
    }

    I"m getting the message that 'close' and 'prevdayclose' do not exist in this context.

    Leave a comment:


  • NinjaTrader_CalH
    replied
    Hello VV Cephei,

    Thank you for your note.

    Since, 4:00 PM is the first bar of the session you could use -
    Code:
    if(Bars.FirstBarOfSession)
    double openPrice = Close[0];
    You can than take openPrice and compare it to Open[0] at 9:30 AM

    http://www.ninjatrader.com/support/h...rofsession.htm

    Let me know if I can be of further assistance.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by chartish, Today, 04:43 PM
0 responses
7 views
0 likes
Last Post chartish  
Started by Trader17, Today, 04:07 PM
0 responses
4 views
0 likes
Last Post Trader17  
Started by GussJ, Today, 01:30 PM
2 responses
19 views
0 likes
Last Post GussJ
by GussJ
 
Started by GARZONJ, Today, 12:25 PM
3 responses
17 views
0 likes
Last Post NinjaTrader_PaulH  
Started by RandanAL, Today, 11:53 AM
1 response
13 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X