Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.
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 bmartz, Today, 09:30 AM
|
2 responses
11 views
0 likes
|
Last Post
by bltdavid
Today, 11:24 AM
|
||
Started by f.saeidi, Today, 11:02 AM
|
1 response
4 views
0 likes
|
Last Post Today, 11:08 AM | ||
Started by geotrades1, Today, 10:02 AM
|
4 responses
12 views
0 likes
|
Last Post
by geotrades1
Today, 11:08 AM
|
||
Started by rajendrasubedi2023, Today, 09:50 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 10:57 AM | ||
Started by lorem, Today, 09:18 AM
|
2 responses
11 views
0 likes
|
Last Post Today, 10:55 AM |
Comment