Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Colour regions
Collapse
X
-
cptrader,
Here is an example : http://www.ninjatrader.com/support/f...ead.php?t=3227
Please let me know if I may assist further.Adam P.NinjaTrader Customer Service
-
cptrader,
Is this kind of what you are looking for? : http://www.ninjatrader.com/support/f...ad.php?t=49802Adam P.NinjaTrader Customer Service
Comment
-
Hi Adam
The link you sent me is about bollinger bands which I am not sure how it applies to what I want.
The following code is what I currently use to high light an area.
if(ToTime(Time[0]) >= 83000 && ToTime(Time[0]) <= 83500)
{BackColor = Color.PaleTurquoise;
DrawText("my tag3", "Warning", 0, High[0]+TickSize*10, Color.Black) ;
}
Instead of doing the whole area, I want the colored area to be between the high and lows of the prescribed period. Thanks
Comment
-
I was hoping to use another piece of code that used something instead of BackColor that plotted a background color from the times indicated in the code but only stretched from the highs to the lows of the period. An example is the snap I posted earlier.(Which was done using a manual box.)
Comment
-
cptrader,
Apologies, I believe we are having a misunderstanding here.
This image : http://www.ninjatrader.com/support/f...kid=350&size=0 has colors between the upper and lower bollinger band. You mentioned coloring only between the highs and lows, as such I am wondering if you wanted to color similar to these bollinger bands, but between your high and low. I.e. instead of using squares, have the chart change color between two plots for example.Adam P.NinjaTrader Customer Service
Comment
-
cptrader,
Here is how you can get the highest high and lowest low over a period set to PeriodValue.
From here, you can draw them using either DrawRectangle command :Code:int highesthigh_index = HighestBar(High,PeriodValue); int lowestlow_index = LowestBar(Low,PeriodValue); double highesthigh = High[highesthigh_index]; double lowestlow = Low[lowestlow_index];
DrawRectangle(string tag, bool autoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Color color, Color areaColor, int areaOpacity)
DrawRectangle(string tag, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, Color areaColor, int areaOpacity)
If you are trying to do this between 8:30 and 8:35, I would suggest translating the "PeriodValue" to reflect this time range, and have your indicator calculate at 8:35.
What sort of chart are you wanting to use this indicator on?Adam P.NinjaTrader Customer Service
Comment
-
cptrader,
It should work just fine on these charts, however please note that with time independent charts such as renko or range charts they wont have the same amount of time per bar, so it may be a little difficult to sync it exactly to a time. Anyway, please let me know if I may assist further.Adam P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
601 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 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
559 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
558 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment