NexusFi: Find Your Edge


Home Menu

 





How to color bars by day/time?


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one futuretrader with 4 posts (2 thanks)
    2. looks_two Sawtooth with 1 posts (2 thanks)
    3. looks_3 lemons with 1 posts (2 thanks)
    4. looks_4 Alphachase with 1 posts (0 thanks)
      Best Posters
    1. looks_one swandro with 2 thanks per post
    2. looks_two WilleeMac with 2 thanks per post
    3. looks_3 Sawtooth with 2 thanks per post
    4. looks_4 futuretrader with 0.5 thanks per post
    1. trending_up 2,843 views
    2. thumb_up 10 thanks given
    3. group 4 followers
    1. forum 8 posts
    2. attach_file 3 attachments




 
Search this Thread

How to color bars by day/time?

  #1 (permalink)
 futuretrader 
Como Italy
 
Experience: Intermediate
Platform: Ninjatrader, customized
Trading: ES
Posts: 525 since Feb 2010
Thanks Given: 471
Thanks Received: 643

What would be the best / easiest way to color bars in SC based on day and time?

Here's an example of what I want from NT, with different colors for each globex session.


Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #2 (permalink)
Alphachase
Nicosia, Cyprus
 
Posts: 191 since Dec 2013
Thanks Given: 28
Thanks Received: 106

I'm not sure if you can paint bars based on time. The only known option is to use Session Indicator study. It will show you a colored line at the bottom of the main price graph. And you can set only two sessions in Sierra Chart.

Reply With Quote
  #3 (permalink)
 Sawtooth 
Prescott AZ USA
 
Experience: Advanced
Platform: SierraChart
Broker: Stage5, FCM:Dorman, Data:Denali, Routing:Teton
Trading: YM ES NQ
Posts: 474 since Nov 2009
Thanks Given: 219
Thanks Received: 603


You can color bars based on time with the Color Bar Based On Alert Condition study. You would need a separate instance of this study for each color, and a Simple Alert formula on the Alerts tab. Here is a link to the documentation:
Study/Chart Alerts And Scanning - Sierra Chart

There is no Identifier in Simple Alerts for day of the week. For this, you'd need to use the Spreadsheet Study study. However, you could alternate two colors based on odd/even of the serialdate.

If you need help with formulas, post here again.

Reply With Quote
Thanked by:
  #4 (permalink)
 futuretrader 
Como Italy
 
Experience: Intermediate
Platform: Ninjatrader, customized
Trading: ES
Posts: 525 since Feb 2010
Thanks Given: 471
Thanks Received: 643

Thanks Tom, I had looked at the documentation for the simple alerts and color bar function, but realized it wouldn't do what I wanted - so it looks like the spreadsheet is the way to go.

I'll play with the spreadsheet and see what I come up with - would I need to use a separate sheet for each color?

I appreciate that you don't need to code in SC, but sometimes it seems a lot easier to whip up some code in Ninja to do these things....

Started this thread Reply With Quote
  #5 (permalink)
 
lemons's Avatar
 lemons 
Tallinn, Estonia
 
Experience: Beginner
Platform: SC
Trading: NAS100
Posts: 959 since Nov 2010

@futuretrader

Simpler is

From "Settings and Inputs " tab pick start and end time


Reply With Quote
  #6 (permalink)
 futuretrader 
Como Italy
 
Experience: Intermediate
Platform: Ninjatrader, customized
Trading: ES
Posts: 525 since Feb 2010
Thanks Given: 471
Thanks Received: 643


lemons View Post

Simpler is

From "Settings and Inputs " tab pick start and end time


Thanks lemons, but as far as I can see that won't give different colors by day of week.

Might be useful for distinguishing day and overnight sessions in other charts, though.

Started this thread Reply With Quote
  #7 (permalink)
 swandro 
England
 
Experience: Advanced
Platform: SierraChart
Posts: 70 since Jul 2009
Thanks Given: 9
Thanks Received: 80


tomgilb View Post
You can color bars based on time with the Color Bar Based On Alert Condition study. You would need a separate instance of this study for each color, and a Simple Alert formula on the Alerts tab. Here is a link to the documentation:
Study/Chart Alerts And Scanning - Sierra Chart

There is no Identifier in Simple Alerts for day of the week. For this, you'd need to use the Spreadsheet Study study. However, you could alternate two colors based on odd/even of the serialdate.

If you need help with formulas, post here again.

Actually, although it does not say so in the documentation, you can use WEEKDAY in an alert formula.

For example, =WEEKDAY(BARDATE)=3

So the full formula would be something like =AND(WEEKDAY(BARDATE)=3,BARTIME >= your start time, BARTIME <= your end time)

Reply With Quote
Thanked by:
  #8 (permalink)
 futuretrader 
Como Italy
 
Experience: Intermediate
Platform: Ninjatrader, customized
Trading: ES
Posts: 525 since Feb 2010
Thanks Given: 471
Thanks Received: 643

Thanks swandro,
I saw your post as I was going to upload the same solution
In the documentation it says that any of the spreadsheet functions can be used, so i did it using 3 alerts.
Pretty straightforward once you know....


Started this thread Reply With Quote
Thanked by:
  #9 (permalink)
 
WilleeMac's Avatar
 WilleeMac 
Prospect, KY. USA
 
Experience: None
Platform: Sierra Chart
Broker: Infinity
Trading: /CL
Posts: 687 since Jan 2012
Thanks Given: 309
Thanks Received: 617

@swandro
@futuretrader

Thank you

I noticed you can also use the following

=WEEKDAY(BARDATE)=MONDAY ........(Tuesday etc)

This perhaps can help with easy identification etc

-William

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on March 8, 2017


© 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