NinjaTrader Support Forum  

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 02-04-2010, 03:25 AM   #1
Rienb
Member
 
Join Date: Feb 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default Swing indicator edits

Hello everybody,

I`m new in the NT world, and i have a friend that will do a indicator edit for me and i would like to have as much information in forward so i can tell him exactly what to be done.

I want to do the following edits to the swing:

- Lines need to be plotted from the high/low to the Y-axis, and not stop by the next swing high/low

- Swings from Chart A need to be Displayed in Chart B.

I would like to know if anyone have suggestions so we will save much time!

Thanks in forward!
Rienb is offline  
Reply With Quote
Old 02-04-2010, 06:50 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,571
Thanks: 262
Thanked 1,018 times in 999 posts
Default

Rienb, welcome to the forums.

You could just extend the last high / low swing with for example horizontal lines extended to the current bar -

http://www.ninjatrader-support.com/H...ontalLine.html

For the swings from another chart, you could call the Swing indicator multiple times with different settings.

Indicators on multiple time frames will be supported with our NT7 -


http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 02-05-2010, 08:30 AM   #3
Rienb
Member
 
Join Date: Feb 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default

When does Ninja 7 will be released? what is the target release date?
Rienb is offline  
Reply With Quote
Old 02-05-2010, 08:53 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,571
Thanks: 262
Thanked 1,018 times in 999 posts
Default

Rienb, we expect to release a public beta within the next month with a production release to follow several months after this.

If you like to be considered for the next beta phase round, please send us a note to sales at ninjatrader dot com and include the following info -

- Free or paying user
- If paying, your license key #
- Country of residence

http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 02-06-2010, 04:03 AM   #5
Rienb
Member
 
Join Date: Feb 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default

We have been testing and searching for the right edit to make, but we did not succeed to create it right.

Does anyone know what to do?

Our feeling sais that we need to edit some in this area:
Quote:
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.Green, PlotStyle.Dot, "Swing high"));
Add(new Plot(Color.Orange, PlotStyle.Dot, "Swing low"));

Plots[0].Pen.Width = 2;
Plots[0].Pen.DashStyle = DashStyle.Dot;
Plots[1].Pen.Width = 2;
Plots[1].Pen.DashStyle = DashStyle.Dot;
Could anyone reply with the edit? i will be very thankfull!
Rienb is offline  
Reply With Quote
Old 02-06-2010, 11:15 AM   #6
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 90 times in 82 posts
Default

Reinb, the settings you highlighted are for how the indicator and plots are displayed. What exactly are you trying to do?
NinjaTrader_Austin is offline  
Reply With Quote
Old 02-06-2010, 11:22 AM   #7
Rienb
Member
 
Join Date: Feb 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default

We are trying to let the swing indicator draw lines that are as the horizontal lines you can draw manually so i can see the swing hi or low even from 3 days back without scrolling, or manually place the lines.
Rienb is offline  
Reply With Quote
Old 02-07-2010, 01:44 PM   #8
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 90 times in 82 posts
Default

Reinb, it isn't possible to have an indicator interact with manually drawn objects. If you have a problem with getting a little snippet of code to work we can help you with that but we can't lay out and/or create an entire indicator for you. Thank you for understanding.
NinjaTrader_Austin is offline  
Reply With Quote
Old 02-07-2010, 02:29 PM   #9
Rienb
Member
 
Join Date: Feb 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default

I understand,

The only thing i would like to see at the Swing indicator is that i can choose to let the lines draw not until the next hi or low but all the way to the Y axis.

any way to fix this easy?
Rienb is offline  
Reply With Quote
Old 02-08-2010, 07:13 AM   #10
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,571
Thanks: 262
Thanked 1,018 times in 999 posts
Default

Rienb, as per my first reply, you could extend them via horizontal lines i.e. -

Code:
 
DrawHorizontalLine("tag1", Swing(3).SwingHigh[0], Color.Blue);
DrawHorizontalLine("tag2", Swing(3).SwingLow[0], Color.Blue);
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 02-10-2010, 05:41 PM   #11
dj22522
Member
 
Join Date: Aug 2008
Posts: 86
Thanks: 3
Thanked 1 time in 1 post
Default ...

This might help.

I only have as cs file.
Attached Files
File Type: cs swingmodified2.cs (16.6 KB, 62 views)
Last edited by dj22522; 02-10-2010 at 06:22 PM.
dj22522 is offline  
Reply With Quote
Old 02-14-2010, 01:35 PM   #12
dj22522
Member
 
Join Date: Aug 2008
Posts: 86
Thanks: 3
Thanked 1 time in 1 post
Default

Quote:
Originally Posted by dj22522 View Post
This might help.

I only have as cs file.
When right clicking on chart and selecting indicator, in the "Plots" section there is only the option to change the colours of the "Swinghigh/Swinglow"
Can anyone add to the "Plots" section so we can change the colour of the swing "lines"?

Many thx.
dj22522 is offline  
Reply With Quote
Old 02-15-2010, 07:28 AM   #13
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

This would have to be custom coded into the indicator as additional parameters. There are no additional plots so you would have to add one for the color you want separately and adjust the code to use it.

Please see here for an example of creating color inputs: http://www.ninjatrader-support2.com/...ead.php?t=4977
NinjaTrader_Josh is offline  
Reply With Quote
Old 03-01-2010, 01:09 AM   #14
Rienb
Member
 
Join Date: Feb 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by dj22522 View Post
When right clicking on chart and selecting indicator, in the "Plots" section there is only the option to change the colours of the "Swinghigh/Swinglow"
Can anyone add to the "Plots" section so we can change the colour of the swing "lines"?

Many thx.
if you open the script in ninjascript editor, search for the text: "green" then you come out at the swing high, then scroll a bit up or down than search for red.

i`ve made them turquoise so if you cant get it working i can post it here....
Rienb is offline  
Reply With Quote
Old 03-01-2010, 01:11 AM   #15
Rienb
Member
 
Join Date: Feb 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by dj22522 View Post
This might help.

I only have as cs file.
Thanks,

That worked great!
Rienb is offline  
Reply With Quote
Reply

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
A problem with Swing indicator. Davizito Strategy Development 6 09-24-2009 07:37 AM
Swing Indicator wcmaria Indicator Development 1 12-04-2008 10:48 AM
Question about Swing Indicator cassb Indicator Development 5 05-13-2008 01:11 PM
Measuring - swing indicator drago1 Indicator Development 1 02-21-2008 04:53 PM
Howard Indicator and Pesavento Pattern Swing Indicator DORAIRAJ_S@HOTMAIL.COM Indicator Development 1 11-12-2007 12:28 AM


All times are GMT -6. The time now is 02:52 AM.