NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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

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

Reply
 
Thread Tools Display Modes
Old 08-12-2011, 01:54 AM   #1
michel
Junior Member
 
Join Date: Aug 2011
Location: United States
Posts: 12
Thanks: 1
Thanked 3 times in 1 post
Send a message via MSN to michel Send a message via Yahoo to michel Send a message via Skype™ to michel
Question adding Pivots to the Pivots indicator? Help

Hello guys so im modifying the pivot point indicator and adding extra pivot levels to it, but this indicator is not your regular indicator it apparently it has custom techniques to plot.
and i have made already some modification to it without success

so what has to be changed to add extra lines to this indicator?

thank you
Last edited by michel; 08-12-2011 at 01:57 AM.
michel is offline  
Reply With Quote
Old 08-12-2011, 02:14 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,409
Thanks: 252
Thanked 975 times in 958 posts
Default

michel, unfortuntatelty we would not be familiar with the custom code you attempt to modify, but there are several Pivot variations in the sharing that would contain more than the default levels :

http://www.ninjatrader.com/support/f...=pivots&desc=1
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 08-12-2011, 02:17 AM   #3
michel
Junior Member
 
Join Date: Aug 2011
Location: United States
Posts: 12
Thanks: 1
Thanked 3 times in 1 post
Send a message via MSN to michel Send a message via Yahoo to michel Send a message via Skype™ to michel
Question

so i have done these things already

step 1
did a replace all strings that matched "Pivots" with "MyPivots" I check the Match case to make sure i dont change other strings

**checked it was working ok

step 2
add brushes 2 brushes in the

#region Variables
private SolidBrush[] brushes = { new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black), new SolidBrush(Color.Black) };

step 3
initialize r4 and s4
private double r4 = 0;
private double s4 = 0;

step 4
add 2 plots in Initialize()
Add(new Plot(Color.Blue, "R4"));
Add(new Plot(Color.Red, "S4"));

in OnBarUpdate()

step 5
add 2 new equations
s4 = pp - 3 * (currentHigh - currentLow);
r4 = pp + 3 * (currentHigh - currentLow);

step 6
add 2 lines ( don't know exactly what they do)
R4.Set(r4);
S4.Set(s4);

step 7
added 2 dataseries? in #region Properties

/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore]
public DataSeries R4
{
get { return Values[7]; }
}

/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore]
public DataSeries S4
{
get { return Values[8]; }
}

after all this steps nothing is plotting

any clues?


so correction...... i added those lines and is working!
Last edited by michel; 08-12-2011 at 02:23 AM. Reason: is working...
michel is offline  
Reply With Quote
Old 08-12-2011, 02:24 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,409
Thanks: 252
Thanked 975 times in 958 posts
Default

Any error messages you would notice in the Control Center Log tab as the indicator is run? Can you please attach your script so we could give it a quick run here?

Thanks,
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 08-12-2011, 02:49 AM   #5
michel
Junior Member
 
Join Date: Aug 2011
Location: United States
Posts: 12
Thanks: 1
Thanked 3 times in 1 post
Send a message via MSN to michel Send a message via Yahoo to michel Send a message via Skype™ to michel
Default

Actually it worked!

i did the same steps before but no success

i just did it again as i was writing this threat and to my surprised it worked!, but that was after i posted this thread

well.... keep for the record that this is how you modify this pivot indicator

cheers
Last edited by michel; 08-12-2011 at 02:51 AM.
michel is offline  
Reply With Quote
Old 08-12-2011, 02:50 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,409
Thanks: 252
Thanked 975 times in 958 posts
Default

We're happy to hear you could resolve it!
NinjaTrader_Bertrand is online now  
Reply With Quote
Reply

Tags
pivots

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
Modify indicator to Add Color and Sound Stan01 Indicator Development 17 07-06-2010 07:33 PM
Trying to add Pivots/Res-lines in script toasty Indicator Development 1 01-11-2010 03:39 PM
Creating a Dataseries that looks like one created by "Add" but that I can modify OzSteve General Programming 13 07-23-2009 06:39 PM
B-LINE Indicator(modify) jake28787 Indicator Development 3 01-06-2009 10:23 AM
Modify Swing High/Low Indicator yimbot Indicator Development 5 12-30-2008 06:16 AM


All times are GMT -6. The time now is 06:08 AM.