help modifying the OHLC bar chart - futures io
futures io



help modifying the OHLC bar chart


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one asf008005 with 2 posts (0 thanks)
    2. looks_two cory with 1 posts (5 thanks)
    3. looks_3 ZingKwan with 1 posts (0 thanks)
    4. looks_4 Big Mike with 1 posts (0 thanks)
    1. trending_up 2,175 views
    2. thumb_up 5 thanks given
    3. group 3 followers
    1. forum 4 posts
    2. attach_file 2 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

help modifying the OHLC bar chart

(login for full post details)
  #1 (permalink)
asf008005
Hartford CT
 
 
Posts: 6 since May 2012
Thanks: 6 given, 0 received

hi,
I just started with ninjatrader and need some help modifying the OHLC bar chart. I would like the bars to be colored based on the previous bar's close, on all time frames.
up(green)=close>prev close
down(red)=close<prev close

Fat Tails was generous enough to help code the price bars.
private override void Initialize()
{
CalculateOnBarClose = false;
}

private override void OnBarUpdate()
{
if (CurrentBar < 1)
return;
if(Close[0] > Close[1])
BarColor = Color.LimeGreen;
else if (Close[0] < Close[1])
BarColor = Color.Red;
else
BarColor = Color.Orange;
}

However, I forgot to mention I would like the volume bars to be set-up the same way. So now I need this code to be modified to work with volume bars. I sent ninja an email requesting a license upgrade so I can try coding myself, we'll see.

Thanks-
Andrew

Reply With Quote

Can you help answer these questions
from other members on futures io?
Is there inherently more opportunity in smaller markets?
Traders Hideout
TD Sequential for NT or MW?
Platforms and Indicators
Eurex Denali vs dxFeed
Sierra Chart
Experience with AGN (Introducing Broker)
Brokers
1 min chart v-shape scan help please
ThinkOrSwim
 
 
(login for full post details)
  #3 (permalink)
 cory 
the coin hunter
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 6,059 since Jun 2009
Thanks: 858 given, 7,943 received


coloring other stuff than price bar is more elaborate, in this case you have 3 colors so you have to add 3 color plots.
ps. the secrete sauce to draw on both panels is to declare "Overlay = false;" then set it to true/false as needed.


asf008005 View Post
hi,
I just started with ninjatrader and need some help modifying the OHLC bar chart. I would like the bars to be colored based on the previous bar's close, on all time frames.
up(green)=close>prev close
down(red)=close<prev close

Fat Tails was generous enough to help code the price bars.
private override void Initialize()
{
CalculateOnBarClose = false;
}

private override void OnBarUpdate()
{
if (CurrentBar < 1)
return;
if(Close[0] > Close[1])
BarColor = Color.LimeGreen;
else if (Close[0] < Close[1])
BarColor = Color.Red;
else
BarColor = Color.Orange;
}

However, I forgot to mention I would like the volume bars to be set-up the same way. So now I need this code to be modified to work with volume bars. I sent ninja an email requesting a license upgrade so I can try coding myself, we'll see.

Thanks-
Andrew


Attached Thumbnails
Click image for larger version

Name:	CL 07-12 (133 Tick)  5_29_2012.jpg
Views:	123
Size:	111.9 KB
ID:	75197  
Attached Files
Register to download File Type: zip MyIndie.zip (2.1 KB, 30 views)
Reply With Quote
The following 5 users say Thank You to cory for this post:
 
(login for full post details)
  #4 (permalink)
asf008005
Hartford CT
 
 
Posts: 6 since May 2012
Thanks: 6 given, 0 received

Cory-
Beautiful! I loaded it on, it looks perfect. Thanks a ton.
I'm so glad I found this forum, everyone has been so helpful!
-Andrew

Reply With Quote
 
(login for full post details)
  #5 (permalink)
 Big Mike 
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
 
Big Mike's Avatar
 
Posts: 50,129 since Jun 2009
Thanks: 32,601 given, 98,784 received

Please remember to use the Thanks button.

Also, please use a more descriptive thread title next time. It helps keep things organized. 10,000 threads of "please help" makes things impossible to locate later. I updated your thread title.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/

Visit other sites? Please spread the word about your experience with our community!
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > help modifying the OHLC bar chart


Last Updated on May 29, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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