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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
41 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
28 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
45 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
37 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment