Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Broker: deepdiscounttrader.com sierra chart/TT & Interactive Brokers
Trading: ES
Posts: 42 since Aug 2010
Thanks Given: 670
Thanks Received: 30
I use the following ninjascriptcode to change the backgroundcolor for certain days on the chart. (see below) The code works ok.
When i want my chart displaying calendardays instead of tradingdays so that weekend days are displayed as empty (no bar-plots) i change the the chart property 'Equidistant bar spacing' to 'false' in the chart properties window. The code does no longer do what i want in that scenario.
How can i change the backgroundcolor for days where there are no plots on the chart ?
Thank you,
protected override void OnBarUpdate()
{
if (CurrentBar < 2)
Broker: deepdiscounttrader.com sierra chart/TT & Interactive Brokers
Trading: ES
Posts: 42 since Aug 2010
Thanks Given: 670
Thanks Received: 30
Thanks Mike.
I included a chart of the ES. When i set the chart property 'Equidistant bar spacing' to 'false' and the session template to 'default 24/7' weekend days are included in the chart.
At midnight on weekdays the backgroundcolor changes because bars are plotted on the chart. On weekend days there are no bars plotted and therefor the backgroundcolor does not change.
The ninjascript code in post #1 does not suffice at that moment.
I am searching for another way to change the backgroundcolor.