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 04-19-2010, 05:57 AM   #1
rtj4201
Senior Member
 
Join Date: Jan 2009
Posts: 333
Thanks: 0
Thanked 0 times in 0 posts
Default NT7 Forum Indicators

I installed NT7 this weekend. What I am finding is that none of the indicators that I have installed for NT6.5 from the Indicator Sharing Forum will work on NT7 without some adjustment.

While I am not a complete novice at programming, I also, do not want to spend all my time doing it as, I would prefer to trade.

Anyone have an idea when the indicators in the Forum will be updated for NT7. Simple is always better. Free is even better.
rtj4201 is offline  
Reply With Quote
Old 04-19-2010, 06:12 AM   #2
NinjaTrader_Tim
NinjaTrader Customer Service
 
NinjaTrader_Tim's Avatar
 
Join Date: Nov 2009
Location: Denver, CO
Posts: 1,424
Thanks: 0
Thanked 3 times in 3 posts
Default

Hi rtj4201,

Thank you for your post.

Some of the indicators will in fact still work with NinjaTrader 7, you will just need to re-import them.

As for the ones that do need code-breaking changes, they will either need to be modified by you, or perhaps you could contact the creator and request they make them NT7 ready.

NinjaScript Code Breaking Changes
Please review the list of code breaking changes at the following link - http://www.ninjatrader-support2.com/...ad.php?t=21016
NinjaTrader_Tim is offline  
Reply With Quote
Old 04-19-2010, 06:21 AM   #3
rtj4201
Senior Member
 
Join Date: Jan 2009
Posts: 333
Thanks: 0
Thanked 0 times in 0 posts
Default

I like to use "ShowBidAsk". I tried to import but it says errors. I copied it to the new directory and recompiled. I got a 1501 error message and I did not fully understand what it was asking to modify.

Can you look at it and see if you can get it to compile?
rtj4201 is offline  
Reply With Quote
Old 04-19-2010, 06:33 AM   #4
NinjaTrader_Tim
NinjaTrader Customer Service
 
NinjaTrader_Tim's Avatar
 
Join Date: Nov 2009
Location: Denver, CO
Posts: 1,424
Thanks: 0
Thanked 3 times in 3 posts
Default

Hi rtj4201,

Unfortunately, I was unable to import the files as well. Please contact the creator for more information.
NinjaTrader_Tim is offline  
Reply With Quote
Old 04-19-2010, 08:17 PM   #5
lightfoot500
Member
 
Join Date: Jul 2009
Posts: 43
Thanks: 4
Thanked 0 times in 0 posts
Default

i was wondering if there are any directions on what changes needed to be made in the code of a 6.5 indicator so it does work on NT 7.0. is it something we can do with ninja editor?
lightfoot500 is offline  
Reply With Quote
Old 04-20-2010, 04:03 AM   #6
p_mid
Junior Member
 
Join Date: Apr 2009
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
Default How to define an Input Series for an Indicator on Indicator?

Hello,

I could not find anything useful with my searches in the forum...

Is it available a very basic example which shows how to use an Input Series, to build an indicator based on another indicator?

Trying to clarify: suppose I want to create an indicator which allows me to draw a stock closing values + another user configurable indicator (e.g. closing values + ATR(20)) - if I define the ATR(20) as an input series, I suppose that Close[0] now refers to the ATR, not to the stock closing values, isn't it?
So, how can I access the closing values, and also the new input series, at the same time?

Thanks in advance,

Paolo
p_mid is offline  
Reply With Quote
Old 04-20-2010, 05:36 AM   #7
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

For our code breaking changes docs please consult this link from the NT7 forums -

http://www.ninjatrader-support2.com/...ad.php?t=21016

For calculating indicators on indicators, please check into our second coding tutorial - http://www.ninjatrader-support.com/H...verview18.html
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-20-2010, 06:41 AM   #8
p_mid
Junior Member
 
Join Date: Apr 2009
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
For calculating indicators on indicators, please check into our second coding tutorial - http://www.ninjatrader-support.com/H...verview18.html
Hello again, the tutorial you refer to calculates

double average = SMA(VOL(), Period)[0];

but both the functions (VOL and SMA) are written in the source code.

If I want to get the Close value of the security, and add an indicator which is not written in the code, but passed as a parameter (Data/Input Series) in NT7 by the user, how can I access its values from inside the code?

Regards,

Paolo
p_mid is offline  
Reply With Quote
Old 04-20-2010, 06:56 AM   #9
NinjaTrader_Tim
NinjaTrader Customer Service
 
NinjaTrader_Tim's Avatar
 
Join Date: Nov 2009
Location: Denver, CO
Posts: 1,424
Thanks: 0
Thanked 3 times in 3 posts
Default

Hi p_mid,

In the following tutorial...

http://www.ninjatrader-support.com/H...tml?Overview24

you create your own historical data series, which is accessible in the code.

So, for example, this series can be...

Code:
myDataSeries.Set(ATR(2)[0] + Close[0])
then you can use this later...

Code:
double NewVar = myDataSeries[0]
NinjaTrader_Tim is offline  
Reply With Quote
Old 04-20-2010, 07:12 AM   #10
p_mid
Junior Member
 
Join Date: Apr 2009
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Tim View Post
you create your own historical data series, which is accessible in the code.

So, for example, this series can be...

Code:
myDataSeries.Set(ATR(2)[0] + Close[0])
then you can use this later...

Code:
double NewVar = myDataSeries[0]
Hi Tim,

thank you for your answer, but I'm missing a final link: I create myDataSeries, but how can I assign the external Input Series (see attached image) to it, so that myDataSeries is not written permanently in the code, but can be changed by the user as a parameter?


Regards,

Paolo
Attached Images
File Type: jpg InputSeries.JPG (40.2 KB, 9 views)
p_mid is offline  
Reply With Quote
Old 04-20-2010, 08:27 AM   #11
NinjaTrader_Tim
NinjaTrader Customer Service
 
NinjaTrader_Tim's Avatar
 
Join Date: Nov 2009
Location: Denver, CO
Posts: 1,424
Thanks: 0
Thanked 3 times in 3 posts
Default

Hi p_mid,

First, you will need to set the dataseries as a plot in the custom indicator to expose it to the GUI.

Then, from the GUI, you can pass in the custom indicator to another indicator by selecting the indicator name, then selecting the plot.
NinjaTrader_Tim is offline  
Reply With Quote
Old 04-21-2010, 04:48 AM   #12
p_mid
Junior Member
 
Join Date: Apr 2009
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
Default

Hello Tim,

thank you for the reply, but this is not the information I am looking for.

I'll try to describe my doubt in another way:

1) I create a custom indicator, and add it to a graph, choosing a ticker (e.g. RIMM)

2) in the indicator parameters window, I set the Data/Input Series to RIMM
2.1) in this case, if from my code I read the values in the Input array, I get the Close values of the ticker

3) now, in the indicator parameters window, I set the Data/Input Series to, e.g., SMA(RIMM (Daily),14)
3.1) in this case, if from my code I read the values in the Input array, I get the SMA(Close) values
3.2) if I need to access, at the same time, also the original Close value, how can I retrieve it? Which is the data structure containing it? It is not Close, as I verified it contains the same data as Input, so I don't know where to look for it.

Thanks in advance,

Paolo
p_mid is offline  
Reply With Quote
Old 04-21-2010, 06:30 AM   #13
NinjaTrader_Tim
NinjaTrader Customer Service
 
NinjaTrader_Tim's Avatar
 
Join Date: Nov 2009
Location: Denver, CO
Posts: 1,424
Thanks: 0
Thanked 3 times in 3 posts
Default

Hi p_mid,

Thanks for the update.

I still need a little clarification to see what you're ultimately after....

"if I need to access, at the same time, also the original Close value, how can I retrieve it?"

Which original close value are you after? The Close of your original dataseries? Close[0] would indeed give you the instruments close price.
NinjaTrader_Tim is offline  
Reply With Quote
Old 04-21-2010, 07:03 AM   #14
p_mid
Junior Member
 
Join Date: Apr 2009
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
Default How to define an Input Series fo Indicator on Indicator?

Quote:
Originally Posted by NinjaTrader_Tim View Post
Which original close value are you after? The Close of your original dataseries? Close[0] would indeed give you the instruments close price.
Hello,

yes, I'm looking for the Close of the original dataseries, and I thought, too, that Close[0] did contain it, but it seems it doesn't: I logged both Input[0] and Close[0], and they refer to the same data:

string lastValue1 = Convert.ToString(Input[0]);
string lastValue2 = Convert.ToString(Close[0]);
Log("Last Input :" + lastValue1 + " - Last Close :" + lastValue2, NinjaTrader.Cbi.LogLevel.Information);

--->

21/04/2010 14.56.06 Default Last Input :71,6713999999998 - Last Close :71,6713999999998
21/04/2010 14.56.06 Default Last Input :71,5729999999998 - Last Close :71,5729999999998
...



which is the value of the SMA, not of the original dataseries.
p_mid is offline  
Reply With Quote
Old 04-21-2010, 07:48 AM   #15
NinjaTrader_Tim
NinjaTrader Customer Service
 
NinjaTrader_Tim's Avatar
 
Join Date: Nov 2009
Location: Denver, CO
Posts: 1,424
Thanks: 0
Thanked 3 times in 3 posts
Default

Hi p_mid,

I have a reply to your latest response, which I need to confirm with a colleague, you can expect an answer shortly.
NinjaTrader_Tim 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
Custom indicators and NT7 chartlearner Indicator Development 1 02-10-2010 09:19 AM
NT7 Indicators question MikeX Version 7 Beta General Questions & Bug Reports 4 11-27-2009 10:40 AM
MTF Indicators in NT7 whitmark Version 7 Beta General Questions & Bug Reports 3 10-05-2009 07:36 AM
Migrating custom Indicators from NT6.5 to NT7 Acqua Indicator Development 4 08-05-2009 09:56 AM
Change default sort order in Indicators and Strategies file sharing forum ctrlbrk Suggestions And Feedback 6 05-04-2009 07:42 AM


All times are GMT -6. The time now is 04:37 AM.