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 08-12-2009, 10:20 AM   #1
cbart_1
Member
 
Join Date: Jul 2009
Location: Texas
Posts: 58
Thanks: 6
Thanked 0 times in 0 posts
Default Plotting My Own Lines

This is what i have so far:

protectedoverridevoid Initialize()
{
Add(
new Line(Color.DarkCyan, PP, "MyPivot"));Add(new Line(Color.DarkCyan, R1, "MyR1"));Add(new Line(Color.DarkCyan, R2, "MyR2"));Add(new Line(Color.DarkCyan, R3, "MyR3"));
Add(new Line(Color.DarkCyan, S1, "MyS1"));Add(new Line(Color.DarkCyan, S2, "MyS2"));
Add(new Line(Color.DarkCyan, S3, "MyS3"));
}

protectedoverridevoid OnBarUpdate()
{
PreHigh = PriorDayOHLC().PriorHigh[
0];
PreLow = PriorDayOHLC().PriorLow[
0];
PreClose = PriorDayOHLC().PriorClose[
0];

PP = (PreHigh + PreLow + PreClose) /
3;
R1 =
2 * PP - PreLow;
R2 = PP + (PreHigh - PreLow);
R3 = R1 + (PreHigh - PreLow);
S1 =
2 * PP - PreHigh;
S2 = PP - (PreHigh - PreLow);
S3 = S1 - (PreHigh - PreLow);

}

What i want is to plot the pivots at the values they equal. I would also like to add text on each line to label which one they are.
cbart_1 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
Plotting different lines in different panels zenith1107 General Programming 1 05-13-2009 06:33 AM
trade visualization not plotting PnL lines ATI user Charting 6 11-13-2008 07:53 AM
Bars and Lines not Plotting RandyT General Programming 4 10-09-2008 09:25 AM
Saving Drawn Lines and Fib Lines jfalbert19 Charting 6 04-01-2008 07:45 PM
Plotting 3 lines beside Wizard generated code grd974 General Programming 2 08-26-2007 02:07 AM


All times are GMT -6. The time now is 01:22 AM.