Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Price line colors in accordance to time frame
Collapse
X
-
Price line colors in accordance to time frame
Is there a way to predefine color settings of price lines based on the time frame of the chart you currently are drawing on? I would like my price lines to show up different shades of Blue based on the time frame and I dont want to have to change each line as I draw it. For instance, if i am on weekly i want it to draw dark blue and if i am on 1 minute chart i want it to draw light sky blue instead of default..Tags: None
-
Hello sashol3,
If you are referring to the price line indicator you would have to save different chart templates with the timeframe name in it to be able to do that using the UI. The alternative is to open the indicator in the editor and Right click -> Save as to create a copy. You can then use the bars type information to set plot colors. Heres an example of how to do that:
Code:else if (State == State.DataLoaded) { if(Bars.BarsType.BarsPeriod.BarsPeriodType == BarsPeriodType.Day) { AskStroke = new Stroke(Brushes.Red, DashStyleHelper.Dash, 1); BidStroke = new Stroke(Brushes.Red, DashStyleHelper.Dash, 1); LastStroke = new Stroke(Brushes.Red, DashStyleHelper.Dash, 1); } if(Bars.BarsType.BarsPeriod.BarsPeriodType == BarsPeriodType.Minute && Bars.BarsType.BarsPeriod.Value == 1) { AskStroke = new Stroke(Brushes.Green, DashStyleHelper.Dash, 1); BidStroke = new Stroke(Brushes.Green, DashStyleHelper.Dash, 1); LastStroke = new Stroke(Brushes.Green, DashStyleHelper.Dash, 1); } }
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
595 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
343 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
556 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
554 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment