Make Charts Pretty! - NinjaTrader Programming | futures io social day trading
futures io futures trading


Make Charts Pretty!
Updated: Views / Replies:40,883 / 194
Created: by Mindset Attachments:67

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 67  
 
Thread Tools Search this Thread
 

Make Charts Pretty!

  #61 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,622 since Mar 2010
Thanks: 4,223 given, 25,494 received
Forum Reputation: Legendary


josh View Post
Is there a way to build a line on close chart in NT with the area under the line shaded, particularly shaded with a gradient? See the attached picture for an idea of what I'm trying to do.

You need to code a little indicator, which shades the area. You can use the NinjaScript method DrawRegion() to do that.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #62 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,291 received


Fat Tails View Post
You need to code a little indicator, which shades the area. You can use the NinjaScript method DrawRegion() to do that.

@Fat Tails

What do you use for the lower boundary?

I can shade between two ema's without a problem so I attempted to use EMA(1) for the upper series and "0" for the lower series but could not get it to work. Also tried CurrentDayOHL().CurrentLow[0] as the lower series, no luck.

Any suggestions would be appreciated.

Thanks!

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
The following user says Thank You to ThatManFromTexas for this post:
 
  #63 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

Simple solution?


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

 
Code
        protected override void Initialize()
        {
            Add(new Plot(Color.FromKnownColor(KnownColor.Transparent), PlotStyle.Line, "Plot0"));
            Add(new Plot(Color.FromKnownColor(KnownColor.Transparent), PlotStyle.Line, "Plot1"));
			
            Overlay				= true;
        }

        protected override void OnBarUpdate()
        {
     
			
			Plot0.Set(Close[0]);
			Plot1.Set(ChartControl.CanvasBottom);
			DrawRegion("myRegion", CurrentBar, 0, Plot0, Plot1, Color.Blue, Color.Blue, 5);
        }


Last edited by Mindset; May 10th, 2012 at 05:31 AM. Reason: add pic
Reply With Quote
The following 6 users say Thank You to Mindset for this post:
 
  #64 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,291 received


Mindset View Post
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

 
Code
        protected override void Initialize()
        {
            Add(new Plot(Color.FromKnownColor(KnownColor.Transparent), PlotStyle.Line, "Plot0"));
            Add(new Plot(Color.FromKnownColor(KnownColor.Transparent), PlotStyle.Line, "Plot1"));
			
            Overlay				= true;
        }

        protected override void OnBarUpdate()
        {
     
			
			Plot0.Set(Close[0]);
			Plot1.Set(ChartControl.CanvasBottom);
			DrawRegion("myRegion", CurrentBar, 0, Plot0, Plot1, Color.Blue, Color.Blue, 5);
        }

@Mindset

Thanks!

I wasn't familiar with (ChartControl.CanvasBottom). (See... I told ya'll I wasn't a programmer... )

Is there documentation on ChartControl variables?

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
The following user says Thank You to ThatManFromTexas for this post:
 
  #65 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,622 since Mar 2010
Thanks: 4,223 given, 25,494 received
Forum Reputation: Legendary

@Mindset: This can be done in a simpler way.

 
Code
protected override void Initialize()
        {
            Add(new Plot(Color.FromKnownColor(KnownColor.Transparent), PlotStyle.Line, "Plot0"));
            Overlay = true;
        }

        protected override void OnBarUpdate()
        {
		Values[0].Set(Close[0]);
		DrawRegion("myRegion", CurrentBar, 0, Values[0], 0, Color.Blue, Color.Blue, 5);
        }

Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
  #66 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

Is there documentation on ChartControl variables?

No - NT refuse to provide any documentation on their code variables that would be useful.

Fat Tails

Neat - but your method entails another data series and I thought that would be less resource efficient - or am I incorrect in that assumption?

Reply With Quote
The following user says Thank You to Mindset for this post:
 
  #67 (permalink)
Elite Member
Georgia, US
 
Futures Experience: None
Platform: Various
Favorite Futures: Various
 
josh's Avatar
 
Posts: 4,898 since Jan 2011
Thanks: 5,143 given, 11,223 received

Mindset and Fat Tails, thank you for your help. However, is there a way to make this shaded area a gradient color?

Reply With Quote
The following user says Thank You to josh for this post:
 
  #68 (permalink)
Membership Revoked
Oslo, Norway
 
Futures Experience: Advanced
Platform: CQG, Excel
Favorite Futures: CL
 
Lornz's Avatar
 
Posts: 1,198 since Apr 2010
Thanks: 500 given, 1,234 received

I find it almost unfathomable that this isn't a built-in function?

Reply With Quote
 
  #69 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,622 since Mar 2010
Thanks: 4,223 given, 25,494 received
Forum Reputation: Legendary


Mindset View Post
Is there documentation on ChartControl variables?

No - NT refuse to provide any documentation on their code variables that would be useful.

Fat Tails

Neat - but your method entails another data series and I thought that would be less resource efficient - or am I incorrect in that assumption?

@Mindset:

No, my method uses a single plot, yours two. Value.Set() or Values[0].Set() is just the correct way setting the values for that single plot.

I bet you introduced additional variables Plot0 and Plot1. My code does not use any variables or properties.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #70 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,291 received



josh View Post
Mindset and Fat Tails, thank you for your help. However, is there a way to make this shaded area a gradient color?

@josh

Here is the single color version. A gradient version will require assistance from the guru's.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


You have an option to draw a line on close as well as dot on close.

You have an option to show price bars along with the colored line on close/dot on close, or hide the bars or show just the line or dot.

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Attached Files
Register to download File Type: zip PriceMountain.zip (2.9 KB, 60 views)
Reply With Quote
The following 4 users say Thank You to ThatManFromTexas for this post:

Reply



futures io > > > > > Make Charts Pretty!

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the difference in the regular Renko charts and the Median Renko charts PamH NinjaTrader 17 February 21st, 2012 07:16 PM
Wish to make a 1st Post TradewithMoe Traders Hideout 3 February 4th, 2011 01:45 PM
PLEASE! Need assist to make this plot Trader.Jon NinjaTrader Programming 4 September 27th, 2010 12:42 PM
Help make 2 indicators of same name coexist please dandxg NinjaTrader Programming 4 January 29th, 2010 08:18 PM


All times are GMT -4. The time now is 10:31 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-10-23 in 0.11 seconds with 20 queries on phoenix via your IP 54.80.209.254