How to Color a Single Bar in NT7? - NinjaTrader Programming | futures io social day trading
futures io futures trading


How to Color a Single Bar in NT7?
Updated: Views / Replies:6,061 / 10
Created: by aligator Attachments:9

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 100,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
 9  
 
Thread Tools Search this Thread
 

How to Color a Single Bar in NT7?

  #1 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,425 since Aug 2010
Thanks: 1,055 given, 5,827 received
Forum Reputation: Legendary

How to Color a Single Bar in NT7?

How to Color a Single Bar in NT7. I would like to color a single bar using BarColor similar to drawing arrows. But when I use the following:

BarColor = Color.Chartreuse;
CandleOutlineColor = Color.Chartreuse;

after my conditions all bars are painted the same. How do I limit painting only to a single bar? I like to paint the bar instead of using arrows or other objects.

Thanks.

Reply With Quote
 
  #2 (permalink)
 Vendor: www.innovative-trading-solutions-online.com 
Hartford, CT. USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG, Kinetick
Favorite Futures: TF
 
RJay's Avatar
 
Posts: 679 since Jun 2009
Thanks: 732 given, 748 received


aligator View Post
How to Color a Single Bar in NT7. I would like to color a single bar using BarColor similar to drawing arrows. But when I use the following:

BarColor = Color.Chartreuse;
CandleOutlineColor = Color.Chartreuse;

after my conditions all bars are painted the same. How do I limit painting only to a single bar? I like to paint the bar instead of using arrows or other objects.

Thanks.

Try this. (Copied from Help area inside NT)


Property Value
A color series type object. Accessing this property via an index value [int barsAgo] returns a color structure representing the referenced bar's color.


Syntax
BarColorSeries
BarColorSeries[int barsAgo]


Examples


// Sets the color of the current bar to blue.

BarColorSeries[0] = Color.Blue;



// Sets the color of the previous bar to orange.


BarColorSeries[1] = Color.Orange;


RJay

Reply With Quote
The following user says Thank You to RJay for this post:
 
  #3 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,425 since Aug 2010
Thanks: 1,055 given, 5,827 received
Forum Reputation: Legendary


Thanks a bunch @RJay for your prompt response. I used the following:

BarColorSeries[0] = Color.Blue;

No luck, and I got all the bars in Blue. I must be missing something. Perhaps I can use an existing indicator as an example. Do you know of a similar indicator on futures.io (formerly BMT)?

Thanks again.

Reply With Quote
 
  #4 (permalink)
Market Wizard
Columbus, OH
 
Futures Experience: None
Platform: NT 8, TOS
Favorite Futures: ES
 
Silvester17's Avatar
 
Posts: 3,382 since Aug 2009
Thanks: 4,668 given, 10,497 received
Forum Reputation: Legendary

Answer
This post has been selected as an answer to the original posters question Answer


aligator View Post
How to Color a Single Bar in NT7. I would like to color a single bar using BarColor similar to drawing arrows. But when I use the following:

BarColor = Color.Chartreuse;
CandleOutlineColor = Color.Chartreuse;

after my conditions all bars are painted the same. How do I limit painting only to a single bar? I like to paint the bar instead of using arrows or other objects.

Thanks.

@aligator

maybe this will help.

I just used the cci as an example. if cci > 0, only the first bar will be colored. the same if cci < 0, only the first bar will be colored.

attached the example indicator for reference.

please keep in mind, there might be better solutions. guess I don't need to tell you, because your programming knowledge is far more superior than mine.

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

Attached Files
Register to download File Type: cs CCIwithSingleBarColor.cs (8.7 KB, 73 views)

Last edited by Silvester17; January 7th, 2012 at 01:03 AM.
Reply With Quote
The following 3 users say Thank You to Silvester17 for this post:
 
  #5 (permalink)
Elite Member
Cincinnati Ohio
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Futures Broker
Favorite Futures: CL, ES
 
Silver Dragon's Avatar
 
Posts: 1,617 since Feb 2011
Thanks: 4,021 given, 3,385 received

Answer
This post has been selected as an answer to the original posters question Answer


aligator View Post
How to Color a Single Bar in NT7. I would like to color a single bar using BarColor similar to drawing arrows. But when I use the following:

BarColor = Color.Chartreuse;
CandleOutlineColor = Color.Chartreuse;

after my conditions all bars are painted the same. How do I limit painting only to a single bar? I like to paint the bar instead of using arrows or other objects.

Thanks.

See attached example. This should get you what you want.
Note: Calulate on Bar close needs to be set to false.

 
Code

if (CurrentBar == Count -1)
{
BarColor = Color.Black;
}
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

nosce te ipsum

You make your own opportunities in life.
Attached Files
Register to download File Type: cs TestColorBar.cs (6.5 KB, 31 views)
Reply With Quote
The following user says Thank You to Silver Dragon for this post:
 
  #6 (permalink)
Elite Member
Cincinnati Ohio
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Futures Broker
Favorite Futures: CL, ES
 
Silver Dragon's Avatar
 
Posts: 1,617 since Feb 2011
Thanks: 4,021 given, 3,385 received

If you wanted to do the current bar and 8 bars back do this:


 
Code

//Current Bar
if (CurrentBar == Count -1)
{
BarColor = Color.Black;
}
 
// 8 bars back
 
if (CurrentBar == Count -8)
{
BarColor = Color.Blue;
}
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

nosce te ipsum

You make your own opportunities in life.
Reply With Quote
The following 4 users say Thank You to Silver Dragon for this post:
 
  #7 (permalink)
 Vendor: www.innovative-trading-solutions-online.com 
Hartford, CT. USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG, Kinetick
Favorite Futures: TF
 
RJay's Avatar
 
Posts: 679 since Jun 2009
Thanks: 732 given, 748 received

Answer
This post has been selected as an answer to the original posters question Answer


aligator View Post
Thanks a bunch @RJay for your prompt response. I used the following:

BarColorSeries[0] = Color.Blue;

No luck, and I got all the bars in Blue. I must be missing something. Perhaps I can use an existing indicator as an example. Do you know of a similar indicator on futures.io (formerly BMT)?

Thanks again.

Just need to specify which bar(s) to color with some specific criteria.

Ex.

if(High[1]>=High[2])if(High[1]>=High[0])BarColorSeries[0] = Color.Orange;

Reply With Quote
The following user says Thank You to RJay for this post:
 
  #8 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,433 since Jun 2009
Thanks: 29,511 given, 84,412 received

 
Thread Moved


Moved from NinjaTrader
Moved to NinjaTrader Programming



When creating a new thread, note which subforum you are in. Here is a short list of suggestions:

- Topic: Anything to do with an Elite indicator -> Subforum: The Elite Circle
- Topic: Looking for an existing indicator, or how-to use an indicator -> Subforum: (the platform)
- Topic: Programmer needing help with non-Elite indicator -> Subforum: (the platform) - Programming
- Topic: Want an indicator created/modified -> Reply to "Want indicator created free" in Elite Circle
- Topic: Vendors (trading rooms, commercial indicators) -> Subforum: Vendors/Product Reviews
- Topic: Discussion of Forex or Currency trading -> Subforum: Forex and Currency Trading
- Topic: Journals of your trading -> Subforum: Trading Journals or Elite Trading Journals
- Topic: General trading related discussions -> Subforum: Traders Hideout
- Topic: Discussion of a trading method -> Subforum: Traders Hideout
- Topic: Automated Trading -> Subforum: Elite Automated Trading

Last, any Elite Member may create more or less any of these topics in The Elite Circle at your own discretion (your support is appreciated).

This is just a short general list and doesn't cover everything. If you are unsure where to create your new thread, just create it in Traders Hideout and a moderator will move it if necessary.

-- Big Mike Trading


Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #9 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,425 since Aug 2010
Thanks: 1,055 given, 5,827 received
Forum Reputation: Legendary

Thanks a million Ticks

Gentle People:

@RJay, @Silvester17, and @Silver Dragon, you guys are awesome! Thank you.

Reply With Quote
 
  #10 (permalink)
Market Wizard
Columbus, OH
 
Futures Experience: None
Platform: NT 8, TOS
Favorite Futures: ES
 
Silvester17's Avatar
 
Posts: 3,382 since Aug 2009
Thanks: 4,668 given, 10,497 received
Forum Reputation: Legendary



Silvester17 View Post
@aligator

maybe this will help.

I just used the cci as an example. if cci > 0, only the first bar will be colored. the same if cci < 0, only the first bar will be colored.

attached the example indicator for reference.

please keep in mind, there might be better solutions. guess I don't need to tell you, because your programming knowledge is far more superior than mine.

another way of course would be to use the "CrossAbove and CrossBelow" function. that also should only color the trigger bar as well.

used the same example as before and attached the indicator for reference.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Attached Files
Register to download File Type: cs CCIwithSingleBarColor.cs (8.5 KB, 36 views)
Reply With Quote
The following user says Thank You to Silvester17 for this post:

Reply



futures io > > > > > How to Color a Single Bar in NT7?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

July Journal Challenge - $500 in Amazon Gift Cards!

July
 

AXESS Trader: Powerful Cloud Based Trading Platform w/GFF Brokers

Jul 17

TBA: FuturesTrader71 w/Morad Askar

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
CANDLE OUTLINE COLOR FOR NT7 Markus NinjaTrader Programming 8 June 30th, 2015 03:32 PM
Heikin Ashi indicator with bar outline same color as bar? Todd NinjaTrader 29 September 7th, 2013 07:33 AM
NT7 Indictor to color price bars by period smcsorley NinjaTrader 10 August 31st, 2011 04:23 PM
NT7 MA region color indicator Doppio NinjaTrader 10 June 9th, 2010 11:19 PM
Color changing Regression Line with Paint Bar Gibby NinjaTrader Programming 49 April 23rd, 2010 02:54 PM


All times are GMT -4. The time now is 02:43 AM. (this page content is cached, log in for real-time version)

Copyright © 2018 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 2018-07-18 in 0.14 seconds with 35 queries on phoenix