NexusFi: Find Your Edge


Home Menu

 





Stock Exchange Session / Time Color Indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 5 posts (8 thanks)
    2. looks_two drunkcolonel with 4 posts (0 thanks)
    3. looks_3 Big Mike with 1 posts (1 thanks)
    4. looks_4 monpere with 1 posts (2 thanks)
    1. trending_up 9,747 views
    2. thumb_up 11 thanks given
    3. group 6 followers
    1. forum 10 posts
    2. attach_file 17 attachments




 
Search this Thread

Stock Exchange Session / Time Color Indicator

  #1 (permalink)
 
drunkcolonel's Avatar
 drunkcolonel 
Pluto is a planet
 
Experience: None
Platform: SierraChart
Trading: Freeze Dried Orange Juice
Posts: 44 since Jul 2011
Thanks Given: 161
Thanks Received: 48

Howdy folks,
I've been trying to figure out the best way to go about something, and I'd really appreciate some help.

A little background: I've been looking at the 6E, and one thing I believe is a good idea is to take a look at how the European session went. I *think* the London Stock Exchange is the biggest one to look at, so it occurred to me I should try and see what happened with the Euro from 3:00 am to 11:30 - the hours LSE is open. (I'm in the Eastern Standard Time zone) As you can see, the first picture is what I was hoping to find. Essentially, an indicator that you could put the specified stock exchange opening and closing times in, and the indicator would plot them.

I did come across the ColorTimesRegionsNT7.cs indicator, as you can see from picture two. However it seems to have some problems plotting, as it doesn't quite line up with the times I inputed. Also there isn't a way to make it semi transparent, so as you can see, the New York sesson just colors over what is remaining of the London session. I was hoping that with a semi transparent setting... it would be easy to see where the stock exchange sessions overlapped.

I'm new to sessions, but have been trying to read more on them. I don't know if this is the best way to go about such things, but its where I've started. So I suppose my questions are:

Is what I'm doing / trying to do stupid? Or am I going about this wrong? Or... if not...

Does anyone know whether or not there is an indicator out there that closely resembles the first picture? Or alternatively...

If the indicator does not exist, could someone give me a very brief synopsis on how they would start to code it? I don't need a walk through, but a point in the right direction would be awesome. (I have some C# programming experience but I've never coded to the ninja platform. )

Cheers,
Curt.

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Build trailing stop for micro index(s)
Psychology and Money Management
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
Are there any eval firms that allow you to sink to your …
Traders Hideout
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


drunkcolonel View Post
Howdy folks,
I've been trying to figure out the best way to go about something, and I'd really appreciate some help.

A little background: I've been looking at the 6E, and one thing I believe is a good idea is to take a look at how the European session went. I *think* the London Stock Exchange is the biggest one to look at, so it occurred to me I should try and see what happened with the Euro from 3:00 am to 11:30 - the hours LSE is open. (I'm in the Eastern Standard Time zone) As you can see, the first picture is what I was hoping to find. Essentially, an indicator that you could put the specified stock exchange opening and closing times in, and the indicator would plot them.

I did come across the ColorTimesRegionsNT7.cs indicator, as you can see from picture two. However it seems to have some problems plotting, as it doesn't quite line up with the times I inputed. Also there isn't a way to make it semi transparent, so as you can see, the New York sesson just colors over what is remaining of the London session. I was hoping that with a semi transparent setting... it would be easy to see where the stock exchange sessions overlapped.

I'm new to sessions, but have been trying to read more on them. I don't know if this is the best way to go about such things, but its where I've started. So I suppose my questions are:

Is what I'm doing / trying to do stupid? Or am I going about this wrong? Or... if not...

Does anyone know whether or not there is an indicator out there that closely resembles the first picture? Or alternatively...

If the indicator does not exist, could someone give me a very brief synopsis on how they would start to code it? I don't need a walk through, but a point in the right direction would be awesome. (I have some C# programming experience but I've never coded to the ninja platform. )

Cheers,
Curt.

@drunkcolonel:

I think what you try to do makes sense. But you need to take into account that you cannot get a correct zone for the London market, if you enter it in US time. This is bound fail, because the US and the UK have different daylight savings schedules. To do it correctly you would create three sessions

- Asian session to be entered in TST (Tokyo Standard Time), TST has no daylight savings schedule.
- European session to be entered in BST (British Standard Time), which is currently 1 hour ahead of Universal Time.
- US session to be entered in EST (US Eastern Time)

The indicator will then convert the times into your local time (whatever it is) and color the sessions correctly.


Determining the correct session times:

There are no fixed rules for the FOREX market, but what you can do is monitor volume. If volume moves up you may consider that the session has started.

(1) US Session: The regular trading hours for 6E start at 7:20 CT (which is 8:20 EST). But of course volume does not follow the rules for the regular session, as the underlying FOREX market is much larger. For the volume analysis you can use the intraday seasonality indicator, which is located here. The thread has a more up-to-date version...



An analysis of the last year of volume data will show you that trading volume increases

Mondays: after 8:00 AM EST (lower volume than for other days)
Tuesdays: after 8:00 AM EST
Wednesdays: after 8:00 AM EST
Thursdays: after 7:40 EST
Fridays: after 8:00 AM EST




You may now safely assume that a session start at 8:00 AM EST is correct for the US session. A similar analysis will show you that trading volume drops significantly after 11:30 AM EST. This is because the London counterparts of the US traders stop working, and they can now only deal among themselves. There is a second drop in liquidity around 3:00 PM EST. After 3:00 PM the market is already asleep. The US market closes at 5:00 PM EST.

(2) European Session: Frankfurt opens at 7:00 AM GMT, London basically one hour later. This is reflected by trade volume. The volume steps up a little bit around 7:00 AM GMT and then doubles after 8:00 AM. However, if you do a range analysis, you will find that the Euro already moves starting from 7:00 AM GMT. There is no rule here, you can either set the European session start at 7:00 AM GMT or 8:00 AM GMT. I prefer to use 7:00 AM as volatility is more important than volume. In the early afternoon New York kicks in, the end of the European session is about 4:30 PM GMT (hour at which the European stock markets close).

But don't use EST for the London session!

(3) Asian session: Tokyo business hours would be from 9:00 AM to 5:00 PM.


Coding the indicator

Use TimeSpan variables to hold the session start and end times. Use TimeZoneInfo to collect TST, GMT and EST. Convert start and end times to local time zone. Then check for each bar in whether it is included
with one of the sessions and select background color accordingly. That is about all you need to do.

Once finished, you can enter the selected hours into your indicator and then display them on your FOREX chart - see below.



Reply With Quote
Thanked by:
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


I forgot to mention a little detail. I was not exactly sure how to blend RGB colors. Something I did the first time today.

This procedure seems to work:

-> select a color for region 1, collect A, R, G, B values from that color
-> select a color for region 2, collect A, R, G, B values from that color
-> calculate arithmetic mean for each of the two A, R, G and B values and round it to integer
-> create new color from the arithmetic mean

At least the result seems to be a color, see overlap regions in chart above.

Reply With Quote
Thanked by:
  #4 (permalink)
 
drunkcolonel's Avatar
 drunkcolonel 
Pluto is a planet
 
Experience: None
Platform: SierraChart
Trading: Freeze Dried Orange Juice
Posts: 44 since Jul 2011
Thanks Given: 161
Thanks Received: 48

Harry,

Your knowledge and generosity never ceases to amaze me sir. It's a lot for my brain to process at the moment, but I'm going to give it the 'old college try' and see what I can create! This will be a good exercise for me in understanding sessions / market times, as well as getting my feet wet programming for ninja trader. I'll only pester you again if I get really stuck.

Thanks so much for just being an awesome person.

Curt.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


drunkcolonel View Post
Harry,

Your knowledge and generosity never ceases to amaze me sir. It's a lot for my brain to process at the moment, but I'm going to give it the 'old college try' and see what I can create! This will be a good exercise for me in understanding sessions / market times, as well as getting my feet wet programming for ninja trader. I'll only pester you again if I get really stuck.

Thanks so much for just being an awesome person.

Curt.

@drunkcolonel: Thank you for your friendly words.


Here are some more hints, how to do the coding:


(1) First declare timespan objects to hold the start and end times of the sessions.


(2) Determine the date of the FOREX session. To determine that date you will need to
-> collect the end of the current session via Bars.Session.GetNextBeginEnd()
-> convert that session end time from local to eastern time

 
Code
sessionDate = TimeZoneInfo.ConvertTime(sessionEndTimeLocal,TimeZoneInfo.Local, newyorkZone).Date;


(3) Decide on the local timezones you want to use for each of the three sessions:

.Net/C# allows you to find a time zone by name. For a timezone you would need to declare a TimeZoneInfo variable, for example

 
Code
TimeZoneInfo  tokyoZone = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time");
TimeZoneInfo londonZone = TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time");
TimeZoneInfo newyorkZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");


(4) Once you have the session date and the timezones, you can convert the Tokyo, London and NewYork times to your local timezone, for example to calculate the start time for the Tokyo session you would

-> add the TimeSpan value that holds the Tokyo start time to the session date
-> then convert that time from Tokyo time to your local time

 
Code
tokyoStartTimeLocal = TimeZoneInfo.ConvertTime(sessionDate + tokyoStartTime, tstZone, TimeZoneInfo.Local);


Once you have converted all three session start times and end times into your local times, it is easy to check whether the current bar is inside one of the sessions and then color the background accordingly.

This would be the basic idea how to code that indicator.

Reply With Quote
Thanked by:
  #6 (permalink)
 
drunkcolonel's Avatar
 drunkcolonel 
Pluto is a planet
 
Experience: None
Platform: SierraChart
Trading: Freeze Dried Orange Juice
Posts: 44 since Jul 2011
Thanks Given: 161
Thanks Received: 48

Hi Harry,

First attempt at using MENTION and my "preview post" option was not showing your handle. So I got your userid from view source. I'm sure there is a php script that was probably supposed to do this for me. But when I preview post, at least now I get a "@Fat Tails" link with your handle. I need to probably lay off the wine.

@Fat Tails

Just incase I've "outsmarted" the Mention I'm gonna do this... and see if it shows... sorry I don't know how to use all the rich text stuff yet. Thanks for your patience.

@Fat Tails

Anyways, I had a question or two if you have the time.

( Also if anyone else out there is reading my post feel free to participate in the discussion )

First, I want to say that I ran off with your code bits and started programming the indicator. Before I knew it I found myself borrowing code from here and there as well. Soon I felt like I was creating spagettii code. I get that uneasy feeling when I write code not understanding exactly what it is doing. So then I desided to take a step back and try and focus on one core Ninjatrader programming concept at a time. I'm hoping that by putting together a few "Hello World" projects, I can atain a true understanding of the inner workings of the platform, versus just slapping down any code just to get the indicator to... ahem "work".

My first "Hello World" project is below.

I wanted to keep things extremely simple, so I've desided not to worry about sessions, daylight savings, or anything of that sort until later. For now, with my first foray into ninjatrader coding, I just wanted to focus on understanding one concept: Time. I am afraid this simple program might bore the hell out of you but I think it's one of the building blocks that is important for me to get under my belt before I advance further. If you have a spare moment, and want to take a look at it ( or if anyone else interested wants to as well ), I've done my best to make it very easy by including a simple chart template, and keeping the indicator code highly organized, commented, and clean. I've also included some screenshots as well as the associated output files. Print statements are my friend

Attached Are:

1. File: a_dev001_HourlyLines.zip Description: This zip contains the template file a_dev001_HourlyLines.xml which helps keep the chart as "bare" as possible, so that it is much easier for me to see the visuals of the indicator. It also contains a_dev001_HourlyLines.cs the actual indicator that paints a vertical line every hour on the hour as well as the corresponding start and end bars.

2. File: FigureOne.png Description: This file shows how the indicator displays on a one minute chart.

3. File: FigureTwo.png Description: This file shows how the indicator displays (or rather not) on a four range chart.

4. File: outputTime.txt Description: This text file shows an example of the output I got when using a one minute chart.

5. File: outputRange.txt Description: This text file shows an example of the output I got when using a four range chart.


Experiment Assumptions:

1. By focusing purely on Time (meaning no exchange openings/closings/holidays/settlement times) I should select the "Default 24/7" session template.

2. This means also I need an instrument that trades around the clock as well, which I believe Forex comes closest to that, so I downloaded data for $EURUSD.

3. To explore Time...I would start with NinjaTrader Time based charts, so I went with the simple one minute chart.

Experiment Results:

The results were pretty much as expected. I was happy to see the indicator printing the relevant well formatted output data, and see the lines and bars painting as they should on the one minute chart. To play around a bit and throw a wildcard in the mix, I desided to see what the indicator would do on a Range chart (where bars are plotted according to price movement, not time). I noticed nothing painted, and just got the 'basic' output data (CurrentBar and Time). But thinking about it, and looking at my output files, it made sence. The TimeSeries associated with each Range Bar does not have any DateTime which matches my "If" statements. So this made me wonder... is Time treated on the charts just as a "function" of the Bar/Data Series? This thought kind of annoyed me. My next thought was: is there no "Global" Time object that can be worked with in NinjaTrader -independent of when a bar might print?

My answer was... even if there was... how would the charts draw? It seems NinjaTrader drawing is based off of DataSeries or TimeSeries indexes. Without that reference, Ninja has no idea where to draw on the chart.

For example, when looking at the output on a 4 Range chart no bar prints exactly at 10AM. So the nearest approximation one can get to 10AM would be bar 162, and one might try do some creative coding to put the so called "hourly" line break here.

162 - 8/6/2012 9:59:10 AM
163 - 8/6/2012 10:02:31 AM


This scenario made my mind itch. It's probably my OCD kicking in.

The only solution I came up with was to add another DataSeries ( i.e. an evenly spaced linear time such as a one minute) to the chart, and have the HourlyLines indicator plot off of the Time series versus the Range series. This idea came directly from playing with your VisualEMA multi-timeframe indicator. I remember using it on a Range chart and having it plot against a 15 minute period and going "whoh"

I plan on looking around nexusfi.com (formerly BMT) for ideas on how to program with multiple data series, as well as digging through whatever can be found in the NinjaTraders documentation. If you or anyone knows of any tutorials or threads on how to program a "hello world" multi series indi like I'm attempting, please let me know incase I miss it in my searches! I will also take any sage wisdom on the matter as well.

If anything I've said is incorrect I very much welcome corrections!!!

Vielen Dank,

Curt.



Attached Files
Elite Membership required to download: a_dev001_HourlyLines.zip
Elite Membership required to download: outputTime.txt
Elite Membership required to download: outputRange.txt
Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,399 since Jun 2009
Thanks Given: 33,175
Thanks Received: 101,539


drunkcolonel View Post
Hi Harry,

First attempt at using MENTION and my "preview post" option was not showing your handle. So I got your userid from view source. I'm sure there is a php script that was probably supposed to do this for me

Simply type the @ symbol followed by the username. That's it. @Big Mike, @drunkcolonel. Nothing more. Nothing special.

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #8 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


drunkcolonel View Post
Hi Harry,

First attempt at using MENTION and my "preview post" option was not showing your handle. So I got your userid from view source. I'm sure there is a php script that was probably supposed to do this for me. But when I preview post, at least now I get a "@Fat Tails" link with your handle. I need to probably lay off the wine.

@Fat Tails

Just incase I've "outsmarted" the Mention I'm gonna do this... and see if it shows... sorry I don't know how to use all the rich text stuff yet. Thanks for your patience.

@Fat Tails

Anyways, I had a question or two if you have the time.

( Also if anyone else out there is reading my post feel free to participate in the discussion )

First, I want to say that I ran off with your code bits and started programming the indicator. Before I knew it I found myself borrowing code from here and there as well. Soon I felt like I was creating spagettii code. I get that uneasy feeling when I write code not understanding exactly what it is doing. So then I desided to take a step back and try and focus on one core Ninjatrader programming concept at a time. I'm hoping that by putting together a few "Hello World" projects, I can atain a true understanding of the inner workings of the platform, versus just slapping down any code just to get the indicator to... ahem "work".

My first "Hello World" project is below.

I wanted to keep things extremely simple, so I've desided not to worry about sessions, daylight savings, or anything of that sort until later. For now, with my first foray into ninjatrader coding, I just wanted to focus on understanding one concept: Time. I am afraid this simple program might bore the hell out of you but I think it's one of the building blocks that is important for me to get under my belt before I advance further. If you have a spare moment, and want to take a look at it ( or if anyone else interested wants to as well ), I've done my best to make it very easy by including a simple chart template, and keeping the indicator code highly organized, commented, and clean. I've also included some screenshots as well as the associated output files. Print statements are my friend

Attached Are:

1. File: a_dev001_HourlyLines.zip Description: This zip contains the template file a_dev001_HourlyLines.xml which helps keep the chart as "bare" as possible, so that it is much easier for me to see the visuals of the indicator. It also contains a_dev001_HourlyLines.cs the actual indicator that paints a vertical line every hour on the hour as well as the corresponding start and end bars.

2. File: FigureOne.png Description: This file shows how the indicator displays on a one minute chart.

3. File: FigureTwo.png Description: This file shows how the indicator displays (or rather not) on a four range chart.

4. File: outputTime.txt Description: This text file shows an example of the output I got when using a one minute chart.

5. File: outputRange.txt Description: This text file shows an example of the output I got when using a four range chart.


Experiment Assumptions:

1. By focusing purely on Time (meaning no exchange openings/closings/holidays/settlement times) I should select the "Default 24/7" session template.

2. This means also I need an instrument that trades around the clock as well, which I believe Forex comes closest to that, so I downloaded data for $EURUSD.

3. To explore Time...I would start with NinjaTrader Time based charts, so I went with the simple one minute chart.

Experiment Results:

The results were pretty much as expected. I was happy to see the indicator printing the relevant well formatted output data, and see the lines and bars painting as they should on the one minute chart. To play around a bit and throw a wildcard in the mix, I desided to see what the indicator would do on a Range chart (where bars are plotted according to price movement, not time). I noticed nothing painted, and just got the 'basic' output data (CurrentBar and Time). But thinking about it, and looking at my output files, it made sence. The TimeSeries associated with each Range Bar does not have any DateTime which matches my "If" statements. So this made me wonder... is Time treated on the charts just as a "function" of the Bar/Data Series? This thought kind of annoyed me. My next thought was: is there no "Global" Time object that can be worked with in NinjaTrader -independent of when a bar might print?

My answer was... even if there was... how would the charts draw? It seems NinjaTrader drawing is based off of DataSeries or TimeSeries indexes. Without that reference, Ninja has no idea where to draw on the chart.

For example, when looking at the output on a 4 Range chart no bar prints exactly at 10AM. So the nearest approximation one can get to 10AM would be bar 162, and one might try do some creative coding to put the so called "hourly" line break here.

162 - 8/6/2012 9:59:10 AM
163 - 8/6/2012 10:02:31 AM


This scenario made my mind itch. It's probably my OCD kicking in.

The only solution I came up with was to add another DataSeries ( i.e. an evenly spaced linear time such as a one minute) to the chart, and have the HourlyLines indicator plot off of the Time series versus the Range series. This idea came directly from playing with your VisualEMA multi-timeframe indicator. I remember using it on a Range chart and having it plot against a 15 minute period and going "whoh"

I plan on looking around nexusfi.com (formerly BMT) for ideas on how to program with multiple data series, as well as digging through whatever can be found in the NinjaTraders documentation. If you or anyone knows of any tutorials or threads on how to program a "hello world" multi series indi like I'm attempting, please let me know incase I miss it in my searches! I will also take any sage wisdom on the matter as well.

If anything I've said is incorrect I very much welcome corrections!!!

Vielen Dank,

Curt.



Hi Curt,

your project is a reasonable start. I have quickly applied your indicator to a chart.

-> it works fine on a 5 minute chart
-> it has holes on a 30 minute chart (not good)
-> it plots nothing on a 60 minute chart (no problem)

The 30 min chart is attached. I use a different session template, and the indicator does not like the session template.


This is the problem: If you do it correctly, you would use a session template that reflects the trading hours of the instrument per contract specifications. For example for 6E the regular session starts at 8:20 AM CT.

Time based bars: NinjaTrader aligns the bars to the session start. That means that a 30 minute chart will have bars with time stamps at 8:50, 9:20, 9:50. Your indicator draws an hourly break line, when the time stamp of a bar is identical wiht 10:00, hence your indicator does not draw any line.

Tick based chart: There will be timestamps maybe at 9:59:37 and the next one at 10:01:12, etc. Your indicator only will draw a line, if the time stamp of the tick bar happens to match 10:00 exactly.

Your approach is no solution, the logic should be like this: If the timestamp of the current bar is greater or equal than 10:00 AM and if the timestamp of the previous bar is smaller than 10:00 AM then draw an hourly line at 10:00 AM. That way you will draw the hourly lines that are not matched by a timestamp of a bar.

You should also try to reduce the code within OnBarUpdate() from 800 to 15 lines.


One important detail:

If you have a session break at 8:30 AM CT (start of the regular session for ES)

-> the minute bar with a timestamp of 8:30:00 belongs to the prior session
-> a tick-built bar with a timestamp of 8:30:00 belongs to the new sessions and represents price action after the session break

The problem is that the granularity of NinjaTrader timestamps is 1 seconds, and as you approach subsecond timestamps, they are truncated. The real-time stamp of that minute bar is indeed 8:30:00 AM and it closes the prior session. However the real time stamp of the tick-built bar may have been 8:30:00:012 (8 hours, 30 minutes, 0 second and 12 milliseconds) and it is being truncated to 8:30:00. The last tick-built bar of the prior session is truncated to 8:29:59.

Just to let you know.



Reply With Quote
Thanked by:
  #9 (permalink)
 
drunkcolonel's Avatar
 drunkcolonel 
Pluto is a planet
 
Experience: None
Platform: SierraChart
Trading: Freeze Dried Orange Juice
Posts: 44 since Jul 2011
Thanks Given: 161
Thanks Received: 48


Fat Tails View Post
This is the problem: If you do it correctly, you would use a session template that reflects the trading hours of the instrument per contract specifications. For example for 6E the regular session starts at 8:20 AM CT.

Hi Harry,

I was wondering if you meant 8:20 Eastern Time? Per my SessonManager.png it says 7:20 and I think it is talking about Central Time... though it does not specify... and I would be an hour "earlier" which for me would be 8:20.

I think the light finally came on inside my head, thanks to your comments. I think sessions are what a lot of traders starting out like me probably get confused on. Even after a lot of reading and watching your webinar. Though I was just trying to simplify one concept at the time -in terms of understanding the inner workings of NT with respect to beginning level programming and how it 'processed time', I can now see how you can't just look at Time in a vacuum regarding trading.

To help any other person out there in the future, I wanted to try and explain my Aha! or more like (Duh!) moment. I find myself reading posts years old, so I know people are going to come across this one day, so hopefully I can save them some time.

One thing I've been working towards is a longer term simulation run / manual backtest of my trading plan. I wanted to see if some setups seemed to work better during certain times. ( Which was why I was trying to easily visually identify when other Exchanges were open with other traders active ) I figured I would keep track of this data, essentially noting when setups frequently occurred e.g.. the 1sts of the month... or various hourly windows such as 9:30-10:30AMs... etc..."

If everything in this business, at least according to Linda Raschke "is a mathematical probability", then it follows that keeping track of when setups materialized, and thier favorable or unfavorable results would be a good idea. The point was to have some statistics to back up the edge I've been trying to develop.

Well the duh moment occurred when I was looking at the Calendar Months July and August. I began thinking about how I would start to do such a longer term back test... (all the while thinking of what you said... figuring there was a gap in my knowledge somewhere). Then I realized looking at July 1st and August 1st... did I really want to compare a Sundays trading action with a Tuesdays? Does that make any sense? Would that not be like comparing an Apple and Orange? I began to think that my initial thinking did not make sense. Then I opened Ninja Traders Session Manger, selected CME FX Futures ETH (I'm working on the 6E), and it showed the contract trading times in terms of Sunday, Monday, Tues, etc... That is, it wasn't about "how well would the set-up historically perform on the 9th or 29th", but rather, how does the set-up tend to do on the Monday or Tuesday...

NOTE: Calendar.png essentially captures what I started realizing with the duh moment.

NOTE: I've attached a picture of the Session Manager with both the Regular Trading Hours and Extended Trading Hours, hopefully it will help some new guy like me one day.

So to explore session templates further, I started by creating 2 basic 10 minute charts. The first one with a session template field set to "Use Instrument Settings", and the second set to "CME Futures FX ETH". I wanted to see is the data displayed on the two charts the same between this default setting and my manual setting. The answer it seems is Yes, Ninja seems to have an automatic way of figuring out an appropriate template for the instrument. After this I closed one chart down, and proceeded to markup the other with the information from Session Manager.

NOTE: DataSeries.png shows what I was talking about with the previous paragraph

In marking up the chart, I ended up with two questions:

1. Where the red circle encloses the question marks: I couldn't figure out what this "break / time span" was. Obviously trading was still occurring... but what is the significance of it not being a part of the Extended Trading Hours template?

2. Where the red circle encloses the box: I couldn't figure out why Time jumped from 17:00 hours to 18:00 hours and what significance this represents with regard to the session template.

NOTE: ChartMarkup.png has the picture with the various markup.

I tried looking back on the CME information page to try and figure it out, I'm sure I'm missing something obvious to others. The only thing I can see is its the ClearPort break? What is that?

Lastly upon trying to digest all this information... I began asking myself some questions on what makes sense to use. Specifically:

1. Are Extended Trading Hour session templates best for what I want to do?

I wanted to be able to trade other Exchanges, knowing that liquidity/volume/participation is coming into the market around certain hours. However if we take the London Stock Exchange as an example, are those blokes looking at an Extended Trading Hours session template? Or are the professional traders mostly paying attention to their (London Stock Exchange time zone adjusted) "Regular Trading Hours" session templates? Which lead to my last question:

2. Would it be better to use separate session templates based off what exchange is currently experiencing the most liquidity? That is: have two session templates: One for London... and trade with it accordingly -seeing what the folks across the pond "see", and another for New York... as liquidity from NY starts taking over... switch to what the New York professionals "see"... ?

My thoughts are just as New York has its "opening range" Highs Lows VWAP and such... would not the London guys be looking at their own opening range, lows, highs and be focused on those important price points?

God I hope this made sense and I just didn't come off a total retard, else I should scrap my dreams and just get everyones address here on nexusfi.com (formerly BMT) so I can send you my money... it would be a lot quicker. lol.

Thanks Harry for any response... I know it is a lot. Too bad you don't have a "Buy Beer" link next to your Fox... it is Oktoberfest after all.





Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #10 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371



drunkcolonel View Post
Howdy folks,
I've been trying to figure out the best way to go about something, and I'd really appreciate some help.

A little background: I've been looking at the 6E, and one thing I believe is a good idea is to take a look at how the European session went. I *think* the London Stock Exchange is the biggest one to look at, so it occurred to me I should try and see what happened with the Euro from 3:00 am to 11:30 - the hours LSE is open. (I'm in the Eastern Standard Time zone) As you can see, the first picture is what I was hoping to find. Essentially, an indicator that you could put the specified stock exchange opening and closing times in, and the indicator would plot them.

I did come across the ColorTimesRegionsNT7.cs indicator, as you can see from picture two. However it seems to have some problems plotting, as it doesn't quite line up with the times I inputed. Also there isn't a way to make it semi transparent, so as you can see, the New York sesson just colors over what is remaining of the London session. I was hoping that with a semi transparent setting... it would be easy to see where the stock exchange sessions overlapped.

I'm new to sessions, but have been trying to read more on them. I don't know if this is the best way to go about such things, but its where I've started. So I suppose my questions are:

Is what I'm doing / trying to do stupid? Or am I going about this wrong? Or... if not...

Does anyone know whether or not there is an indicator out there that closely resembles the first picture? Or alternatively...

If the indicator does not exist, could someone give me a very brief synopsis on how they would start to code it? I don't need a walk through, but a point in the right direction would be awesome. (I have some C# programming experience but I've never coded to the ninja platform. )

Cheers,
Curt.

Have you tried the TimeZoneColors indicator? It blends the colors in the overlapped time sessions.


Reply With Quote
Thanked by:




Last Updated on October 2, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts