Hi, I have a simple question on how to retrieve the Close at 1615 (end of eMini session) on a 24 hours chart... lastly, I would need the open at 930am to test a gap fading strategy.
Any help / pointers would be greatly appreciated.
Thanks.
Simple Question - Close at 1615pm on a 24 hours chart?
-
- Posts: 38
- Joined: 11 Jun 2006
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
press the [F1] key and check out these keywords:
Sess1EndTime
Sess1FirstBarTime
Sess1StartTime
Sess2EndTime
Sess2FirstBarTime
Sess2StartTime
SessionCount
SessionCountMS
SessionEndDay
SessionEndDayMS
SessionEndTime
SessionEndTimeMS
SessionLastBar
SessionStartDay
SessionStartDayMS
SessionStartTime
SessionStartTimeMS
Sess1EndTime
Sess1FirstBarTime
Sess1StartTime
Sess2EndTime
Sess2FirstBarTime
Sess2StartTime
SessionCount
SessionCountMS
SessionEndDay
SessionEndDayMS
SessionEndTime
SessionEndTimeMS
SessionLastBar
SessionStartDay
SessionStartDayMS
SessionStartTime
SessionStartTimeMS
Re:
Hi TJ
I found this thread after posting on this other one first: viewtopic.php?f=1&t=7194
The example here is very close to my issue. I'm trying to find the close for prior sessions (but not just the last one). As I understand it, in your posted solution 'close1615' will be overwritten with each subsequent session's closing price. If this understanding is correct, do you know a way to reference not only the previous session's closing price but also the closing session price of the day before that?
many thanks
I found this thread after posting on this other one first: viewtopic.php?f=1&t=7194
The example here is very close to my issue. I'm trying to find the close for prior sessions (but not just the last one). As I understand it, in your posted solution 'close1615' will be overwritten with each subsequent session's closing price. If this understanding is correct, do you know a way to reference not only the previous session's closing price but also the closing session price of the day before that?
many thanks
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Re:
What instrument and chart resolution are you using?Hi TJ
I found this thread after posting on this other one first: viewtopic.php?f=1&t=7194
The example here is very close to my issue. I'm trying to find the close for prior sessions (but not just the last one). As I understand it, in your posted solution 'close1615' will be overwritten with each subsequent session's closing price. If this understanding is correct, do you know a way to reference not only the previous session's closing price but also the closing session price of the day before that?
many thanks
Are you charting 24 hrs? or RTH?
What efforts have you attempted?
Re: Re:
Its a crude oil future (CL on Nymex) which trades continuously from 18:00 ET to 17:15 ET the following day. I'm using a 1-minute bar resolution.What instrument and chart resolution are you using?Hi TJ
I found this thread after posting on this other one first: viewtopic.php?f=1&t=7194
The example here is very close to my issue. I'm trying to find the close for prior sessions (but not just the last one). As I understand it, in your posted solution 'close1615' will be overwritten with each subsequent session's closing price. If this understanding is correct, do you know a way to reference not only the previous session's closing price but also the closing session price of the day before that?
many thanks
Are you charting 24 hrs? or RTH?
What efforts have you attempted?
The difficulty I'm having is that closeD refers to the date close, not the session. Therefore I have been digging into ways to look-up (or record) the session close going back several days. Without success so far.
Hope that helps
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Re:
You can do the following:...
Its a crude oil future (CL on Nymex) which trades continuously from 18:00 ET to 17:15 ET the following day. I'm using a 1-minute bar resolution.
The difficulty I'm having is that closeD refers to the date close, not the session. Therefore I have been digging into ways to look-up (or record) the session close going back several days. Without success so far.
Hope that helps
1. add a second data series with the session ending 1615.
2. use this funtion on the second data:
CloseD(1) of data2
for more information on multi-data analysis, see post #4
viewtopic.php?f=16&t=6929
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Simple Question - Close at 1615pm on a 24 hours chart?
another method is to count the number of bars.
e.g. there are 24 x 60 = 1440 one minute bars in a day (assume 24 hr chart).
if you are at 10 bars since 1615, the the value of the close is C[10].
if you want to know the close of previous day,
the value is C[10+1440].
e.g. there are 24 x 60 = 1440 one minute bars in a day (assume 24 hr chart).
if you are at 10 bars since 1615, the the value of the close is C[10].
if you want to know the close of previous day,
the value is C[10+1440].
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Simple Question - Close at 1615pm on a 24 hours chart?
You can always make the bar number an input variable,Thanks TJ.
I need to think about this a bit. Its not bad, but not ideal either. The risk is you change the bar resolution and then it wouldn't work...
or, use BarInterval to make an automatic calculation.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Simple Question - Close at 1615pm on a 24 hours chart?
Another method:
Use ARRAY to store the closing prices.
Use ARRAY to store the closing prices.