NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-26-2011, 10:37 PM   #1
Taddypole
Senior Member
 
Join Date: Mar 2007
Location: , ,
Posts: 240
Thanks: 1
Thanked 2 times in 2 posts
Default How to reference a Plot or a Line

In the attached code, I'm trying to color the Zeroline based on the value of "Diff". On lines 90 and 96 of the code, the PlotColors are referencing Index 4. Index 4 is an "Add" statement to add a line in the "Initialize" section. Are Add lines and Add Plots different from an Indexing point of view?

I've been looking at this for a long time and can't figure it out. When Diff is positive I want to color the line Green, when the Diff is negative, I want to color the line Red.

I'd appreciate it if someone can point me in the right direction.

Thanks...
Taddypole...
Attached Images
File Type: png TestMacd.png (41.9 KB, 7 views)
Attached Files
File Type: cs TestMacd.cs (8.9 KB, 5 views)
Taddypole is offline  
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plot Horizontal Line ? Torso Strategy Development 2 09-17-2010 11:52 AM
I can't get this line to plot. What am I missing? kaywai General Programming 6 06-01-2010 09:23 AM
plot dash line velocity General Programming 3 12-17-2009 07:22 AM
Plot horizontal line ssg10 General Programming 1 05-13-2009 05:54 AM
Line Plot velocity General Programming 10 05-07-2009 05:59 AM


All times are GMT -6. The time now is 11:58 PM.