For Instance if you have diff= Donchian.Upper[1] - Donchian.Lower[1]; how do I "write something" that will Fill the Entire Color area which is 'diff'.
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
Color Fill the Distance Between Two Plots
Collapse
X
-
Color Fill the Distance Between Two Plots
Hello, Is it possible to Fill the Color Area Between Two Plots.
For Instance if you have diff= Donchian.Upper[1] - Donchian.Lower[1]; how do I "write something" that will Fill the Entire Color area which is 'diff'.Tags: None
-
Hello,
Thank you for your post.
You could color in the difference of two plots by using DrawRegion(). Please see the following link on DrawRegion() http://ninjatrader.com/support/helpG...drawregion.htm
There is an example of using DrawRegion to color between two plots on the Forum. This indicator is the SMARegions and colors in the differences of two SMAs. You can download this indicator from the following link, http://ninjatrader.com/support/forum...tid=4&lpage=9]
Please let us know if we can be of any other assistance.Cody B.NinjaTrader Customer Service
-
Originally posted by ginx10k View PostHello, Is it possible to Fill the Color Area Between Two Plots.
For Instance if you have diff= Donchian.Upper[1] - Donchian.Lower[1]; how do I "write something" that will Fill the Entire Color area which is 'diff'.
The best futures trading community on the planet: futures trading, market news, trading charts, trading platforms, trading strategies
If you cannot download it from www.futures.io, please send me a private message with your e-mail and I will send it to you.
The Donchian Channel has the area between the bands filled. The indicator comes open source. You can easily study how it is done. Basically there are two ways of doing it
-> either use DrawRegion(), which is a NinjaScript command
-> alternatively code a custom plot which would be more accurate and faster
Comment
-
Hello,
I´m trying to draw a region from Donchian Upper to a certain distance in Ticks below the upper, but can´t get it working. From the forum and the samples I can draw regions between MA, DonchianUpper and lower.... but not from and indicator to a distance in ticks.
Thank you
Tony
Comment
-
Hello,
This could be accomplished using the overload set:
Code:DrawRegion(string tag, int startBarsAgo, int endBarsAgo, IDataSeries series, double y, Color outlineColor, Color areaColor, int areaOpacity)
You can supply the Indicators plot as the IDataSeries, and the a calculated value as the double value.
An example would be:
Code:protected override void OnBarUpdate() { if(CurrentBar < 1) return; DrawRegion("Region" + CurrentBar, 0, 1, DonchianChannel(12).Upper, DonchianChannel(12).Upper[0] - 2 * TickSize, Color.Red, Color.Red, 100); }
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by traderqz, Today, 12:06 AM
|
10 responses
18 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
5 responses
46 views
0 likes
|
Last Post Today, 02:36 PM | ||
Started by arvidvanstaey, Today, 02:19 PM
|
1 response
6 views
0 likes
|
Last Post Today, 02:33 PM | ||
Started by mmckinnm, Today, 01:34 PM
|
3 responses
5 views
0 likes
|
Last Post Today, 02:12 PM | ||
Started by f.saeidi, Today, 01:32 PM
|
2 responses
9 views
0 likes
|
Last Post
by f.saeidi
Today, 02:10 PM
|
Comment