NexusFi: Find Your Edge


Home Menu

 





Color Bar based on Time of Day


Discussion in Sierra Chart

Updated
    1. trending_up 1,567 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

Color Bar based on Time of Day

  #1 (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

I use this study to quickly identify time of day, specifically Globex (London) vs regular trading hours (New York.)

I looked at using =OR(AND(xxxxx) , AND(xxxxx)) but I could not figure out how to differentiate between an up bar and a down bar so I went with two copies of "Color Bar Based On Alert Condition".

You can also use this with "Color Background Based on Alert Condition." (Remove C>=O, C<=O)

Up bar syntax

=AND(C>=O,BARTIME >= ((09*60)/(24*60)), BARTIME <= ((09*60+29)/(24*60)))

Down bar syntax

=AND(C<=O,BARTIME >= ((09*60)/(24*60)), BARTIME <= ((09*60+29)/(24*60)))

Use Study Settings >>Subgraphs >> Draw Style >> Color Bar hollow or Color Bar (up vs down)

-William

Follow me on Twitter Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
 
  #2 (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

If you want to use this study alert starting at the half hour

Up bar

=AND(C>=O,BARTIME >= ((03*60+30)/(24*60)), BARTIME <= ((03*60+59)/(24*60)))

Down bar

=AND(C<=O,BARTIME >= ((03*60+30)/(24*60)), BARTIME <= ((03*60+59)/(24*60)))

-William

Follow me on Twitter Started this thread 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



WilleeMac View Post
If you want to use this study alert starting at the half hour

Up bar

=AND(C>=O,BARTIME >= ((03*60+30)/(24*60)), BARTIME <= ((03*60+59)/(24*60)))

Down bar

=AND(C<=O,BARTIME >= ((03*60+30)/(24*60)), BARTIME <= ((03*60+59)/(24*60)))

-William

You can avoid all of the math if use the TIMEVALUE function:

=AND(C>=O,BARTIME >= TIMEVALUE("03:30:00"), BARTIME <= TIMEVALUE("03:59:00"))
=AND(C<=O,BARTIME >= TIMEVALUE("03:30:00"), BARTIME <= TIMEVALUE("03:59:00"))

Reply With Quote
Thanked by:
  #4 (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

Thank you

I'm far from being a scripter, more of a hacker

-William

Follow me on Twitter Started this thread Reply With Quote
Thanked by:




Last Updated on March 11, 2016


© 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