NexusFi: Find Your Edge


Home Menu

 





Indicator not Plotting correct bar color


Discussion in NinjaTrader

Updated
    1. trending_up 1,702 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
ECI Ed
Seminole, FL
 
Posts: 17 since Oct 2011
Thanks Given: 9
Thanks Received: 3

The attached indicator compiles and calculates the correct values, but it won't plot the bar color correctly and I can't adjust the width of the bar, and I'm getting no clues as to what the problem could be. Could someone please help point me to the incorrect syntax?

Thanks in advance.

Attached Files
Elite Membership required to download: SMIwDiv.cs
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Help re translation of ninjascript to EL
NinjaTrader
How to plot a custom icon for crossover
NinjaTrader
Brendt Skorupinsky
Trading Reviews and Vendors
Pivot Indicator based on Level2 data
NinjaTrader
Has anyone taken The Confident Trader course from aheadc …
Trading Reviews and Vendors
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
ApexTraderFunding.com experience and review
74 thanks
HumbleTraders next chapter
51 thanks
Winning attitudes create winning traders
39 thanks
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Topstep experience and review
33 thanks
  #3 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527



ECI Ed View Post
The attached indicator compiles and calculates the correct values, but it won't plot the bar color correctly and I can't adjust the width of the bar, and I'm getting no clues as to what the problem could be. Could someone please help point me to the incorrect syntax?

Thanks in advance.

I would try something like this:

 
Code
if ( smis[0]>esmis[0] ) 
				
				PlotColors[0][0] = Color.Lime;
			else 
				PlotColors[0][0] = Color.Red;
edit:

also why do you need this part:

 
Code
                        Lines[0].Pen = new Pen(Color.Red, 2);
		 	Lines[1].Pen = new Pen(Color.Red, 2);
		   	Lines[2].Pen = new Pen(Color.Gray, 2);
I think you can delete those lines and still get the desired result.

Reply With Quote
Thanked by:




Last Updated on July 1, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts