NexusFi: Find Your Edge


Home Menu

 





Highlight a specific time frame / session on a chart


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 3 posts (5 thanks)
    2. looks_two Arpad with 3 posts (0 thanks)
    3. looks_3 mark1 with 1 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 6,525 views
    2. thumb_up 6 thanks given
    3. group 4 followers
    1. forum 8 posts
    2. attach_file 1 attachments




 
Search this Thread

Highlight a specific time frame / session on a chart

  #1 (permalink)
 
Arpad's Avatar
 Arpad 
Hungary
 
Experience: Beginner
Platform: N/A
Trading: Forex
Posts: 34 since Dec 2010
Thanks Given: 145
Thanks Received: 9

Dear Fellow Members,

Is there a way to highlight a specific time frame on a chart in NinjaTrader? (Although now I use NinjaTrader, I’m really curious about whether is this possible in MultiCharts?)
I’d like to highlight e.g. the NY close session, or any other selectable duration (30 mins, 2 hours etc) time period.
I’d like to do this in a way that the highlights are repeated on the chart, so for example if I watch a 15 min chart for a period of 30 days, the time frames should be highlighted on all the 30 days.

Is there an indicator for this purpose or any solution?


Thank you very much.
Heaps of pips to everyone.

Arpad

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Are there any eval firms that allow you to sink to your …
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
43 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #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 have coded an indicator that changes the backcolor for intraday sessions as defined per the session manager. The indicator can be found here:



If you want to highlight parts of trading session this can be done in a similar way. It would just need a small modification of the indicator.

It is important to use the session feature, otherwise you will run into issues with the different daylight savings schedules sooner or later.

Reply With Quote
Thanked by:
  #4 (permalink)
mark1
Italy
 
Posts: 3 since Jul 2010
Thanks Given: 1
Thanks Received: 1


Arpad View Post
Dear Fellow Members,

Is there a way to highlight a specific time frame on a chart in NinjaTrader? (Although now I use NinjaTrader, I’m really curious about whether is this possible in MultiCharts?)
I’d like to highlight e.g. the NY close session, or any other selectable duration (30 mins, 2 hours etc) time period.
I’d like to do this in a way that the highlights are repeated on the chart, so for example if I watch a 15 min chart for a period of 30 days, the time frames should be highlighted on all the 30 days.

Is there an indicator for this purpose or any solution?


Thank you very much.
Heaps of pips to everyone.

Arpad


This is the code for MC:

 
Code
inputs : SessionStart(0930), SessionEnd (1600), LunchStart (1130), LunchEnd (1400), AHColor(White), LunchColor(Cyan); 

{
Written by YMTrader on April 10, 2008

This is an ELD for color coding bars that are AH or Lunch. 
Configurable with inputs.

SessionStart(0930): What time the session Opens
SessionEnd (1600): What time the session Closes
LunchStart (1130): What time the Lunch starts
LunchEnd (1400): What time the Lunch ends 
AHColor(White): Color of your AH bar
LunchColor(Cyan): Color of your Lunch bar

}

if Time < SessionStart or Time > SessionEnd then
	begin
	PlotPaintBar( High, Low, "AH", AHColor ) ;
	Alert ;
	end ;	


	if Time > LunchStart and Time < LunchEnd then
	begin
	PlotPaintBar( High, Low, "AH", LunchColor  ) ;
	Alert ;
	end ;

Attached Thumbnails
Click image for larger version

Name:	hrs.png
Views:	344
Size:	26.4 KB
ID:	29216  
Reply With Quote
Thanked by:
  #5 (permalink)
 
Arpad's Avatar
 Arpad 
Hungary
 
Experience: Beginner
Platform: N/A
Trading: Forex
Posts: 34 since Dec 2010
Thanks Given: 145
Thanks Received: 9

Dear @Fat Tails,

Thank you for your help.
This indicator is great. And the others that you have created, too.
Accept my sincere and profound reverence for your efforts for helping others with such great indicators and post and comments.

For those who might be interested also, I’ve found another indicator for this purpose, which is also great:
[COLOR=#800080]https://nexusfi.com/free_downloads/[AUTOLINK]ninjatrader[/AUTOLINK]-7/indicators/775-download.html?view[/COLOR]


By the way, what is the purpose of trading sessions and more specifically, session templates?
I mean, why wouldn’t you simply set 24/7 for any instrument? If there is no data coming, the chart will halt, so you end up with the same chart as if you would set the appropriate session template with selective time frames.

What do you gain if you set the appropriate session template instead of 24/7?

Please elaborate this.


Thanks,
Arpad

Started this thread Reply With Quote
  #6 (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


Arpad View Post
Dear @Fat Tails,

Thank you for your help.
This indicator is great. And the others that you have created, too.
Accept my sincere and profound reverence for your efforts for helping others with such great indicators and post and comments.

For those who might be interested also, I’ve found another indicator for this purpose, which is also great:
[COLOR=#800080]https://nexusfi.com/free_downloads/[AUTOLINK]ninjatrader[/AUTOLINK]-7/indicators/775-download.html?view[/COLOR]


By the way, what is the purpose of trading sessions and more specifically, session templates?
I mean, why wouldn’t you simply set 24/7 for any instrument? If there is no data coming, the chart will halt, so you end up with the same chart as if you would set the appropriate session template with selective time frames.

What do you gain if you set the appropriate session template instead of 24/7?

Please elaborate this.


Thanks,
Arpad


Usually a trading session for futures includes the night session and the day session, which is identical with the floor session. There is a number of trading tools that require the exact start time and end time of the day session. These include

- the opening range
- market profile
- the current day's volume weighted average price (VWAP) as a benchmark
- the daily range of the RTH session
- floor pivots
- dynamic fib levels

Session templates simply store start and end times of these sessions and make them available for use with indicators and strategies.

Let us assume that I want to trade ES and CL and use some of the above tools with and without a session template.

Without a session template:

Store session start and end time for each traded instrument within each indicator (LOL). Otherwise when toggling from one instrument to another you would need to reenter session start and end times. Convert US time to European time. Use different time conversion algorithms for each instrument (LOL). Code an algorithm to cope with different daylight savings rules to compensate for the differences between local time and exchange time (this is actually fun, I did it for NT 6.5).

With a session template:

Once create session template for each instrument and attach the template to instrument via instrument manager. Use <instrument settings> for all charts.

For all instruments you can now access session start and end times in your local time zone. Toggling from one instrument to another, different daylight savings schedules, no problem, your session start and end times are always correct.

Let us say that without session templates it is near impossible to use the above trading tools.

Reply With Quote
Thanked by:
  #7 (permalink)
 
Arpad's Avatar
 Arpad 
Hungary
 
Experience: Beginner
Platform: N/A
Trading: Forex
Posts: 34 since Dec 2010
Thanks Given: 145
Thanks Received: 9

Now I see. It’s clear. Thank you for your thorough answer.
And again, profound esteem to you for your immense efforts for helping us, in general.

Started this thread Reply With Quote
  #8 (permalink)
 syxforex 
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
Posts: 1,091 since May 2010


Fat Tails View Post
Usually a trading session for futures includes the night session and the day session, which is identical with the floor session. There is a number of trading tools that require the exact start time and end time of the day session. These include

- the opening range
- market profile
- the current day's volume weighted average price (VWAP) as a benchmark
- the daily range of the RTH session
- floor pivots
- dynamic fib levels

Session templates simply store start and end times of these sessions and make them available for use with indicators and strategies.

Let us assume that I want to trade ES and CL and use some of the above tools with and without a session template.

Without a session template:

Store session start and end time for each traded instrument within each indicator (LOL). Otherwise when toggling from one instrument to another you would need to reenter session start and end times. Convert US time to European time. Use different time conversion algorithms for each instrument (LOL). Code an algorithm to cope with different daylight savings rules to compensate for the differences between local time and exchange time (this is actually fun, I did it for NT 6.5).

With a session template:

Once create session template for each instrument and attach the template to instrument via instrument manager. Use <instrument settings> for all charts.

For all instruments you can now access session start and end times in your local time zone. Toggling from one instrument to another, different daylight savings schedules, no problem, your session start and end times are always correct.

Let us say that without session templates it is near impossible to use the above trading tools.

Thanks Fat Tails,

Is it straightforward to make a session template?

Visit my NexusFi Trade Journal Reply With Quote
  #9 (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


syxforex View Post
Thanks Fat Tails,

Is it straightforward to make a session template?

(1) Use the session manager. Create an appropriate session template for your instrument. Save it.

(2) Select this template under instrument settings.

(3) From now on, only open your charts with instrument settings.

There is a thread explaining how to setup session templates here:



Reply With Quote
Thanked by:




Last Updated on April 7, 2011


© 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