![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: Apr 2008
Posts: 310
Thanks: 0
Thanked 0 times in 0 posts
|
Hi everyone,
Just installed NJ and loving it. I tried to build a simple custom indicator, based on the difference of two RSI (on different length), but I cannot build it using the double function: double RS1 = RSI... double RS2 = RSI... double diff = RS1 - RS2 I get "Cannot implicitly convert type Ninjatrader.Indicator.RSI to double CS0029. I understand I cannot use double to subtract two indicators, but how am I supposed to do? Thank you everyone for help |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Unfortunately this is not supported. You would need to implement a custom indicator which subtracts these values data point by data point and stuffs the result in its own plot/data series.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Apr 2008
Posts: 310
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
Could you explain (with an example or with a similar indicator) how to do that? Otherwise I don't think I will manage to move forward...
|
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
I suggest ripping through our indicator code samples and the references and tips here:
http://www.ninjatrader-support.com/v...splay.php?f=30 http://www.ninjatrader-support.com/v...splay.php?f=31
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Apr 2008
Posts: 310
Thanks: 0
Thanked 0 times in 0 posts
|
Following the tutorials:
1) I introduced the variables: #region Variables private DataTimeSeries RSI1; DataTimeSeries RSI2; #endregion 2) I declared the variables: RSI1.Set(RSI(...)); RSI2.Set(RSI(...)); RSI1 = new DateTimeSeries(this); RSI2 = new DateTimeSeries(this); double diff = RSI1 - RSI2; Yet, it doesn't work! Who can help me with an example? Thank you everyone |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Please import the attached via Files > Utilities and review the source code.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| we need indicators !!! | Elmi | Indicator Development | 77 | 07-25-2012 10:15 AM |
| new indicators | JAY526 | Charting | 28 | 12-19-2011 03:19 PM |
| Charting indicators using other indicators as the input | Elliott Wave | Charting | 3 | 04-04-2008 03:54 PM |
| Subtract an indicator | snake | Strategy Development | 1 | 06-06-2007 02:22 PM |
| TTM Indicators | Freddie | Indicator Development | 1 | 03-11-2007 06:28 AM |