NexusFi: Find Your Edge


Home Menu

 





Need info on coding a reference to another indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Saroj with 4 posts (0 thanks)
    2. looks_two RJay with 2 posts (0 thanks)
    3. looks_3 TAJTrades with 2 posts (1 thanks)
    4. looks_4 roonius with 1 posts (1 thanks)
    1. trending_up 6,541 views
    2. thumb_up 2 thanks given
    3. group 0 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 482 since Jun 2009
Thanks Given: 232
Thanks Received: 416

whether a plot or a value calculated within the external indicator...

I've seen something either here or in NT forum, but can't find it in either forum nor in the Help Guide.

TIA, Saroj


Started this thread Reply With Quote

 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Hello Im new here
5 thanks
  #2 (permalink)
TAJTrades
Here, GA
 
Posts: 158 since Jun 2009
Thanks Given: 1
Thanks Received: 87


Saroj View Post
whether a plot or a value calculated within the external indicator...

I've seen something either here or in NT forum, but can't find it in either forum nor in the Help Guide.

TIA, Saroj

Toss up a little more info on what you are trying to do and I will try to post some code example.


Reply With Quote
  #3 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 Vendor: www.innovative-trading-solutions-online.com 
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: ES
Posts: 687 since Jun 2009
Thanks Given: 765
Thanks Received: 789



Saroj View Post
whether a plot or a value calculated within the external indicator...

I've seen something either here or in NT forum, but can't find it in either forum nor in the Help Guide.

TIA, Saroj

Saroj,

I use three different methods to get the correct plot code/ variable sequence.

--------------------------------------------------------------------------

1 , use Intellisense. In editor, type in the indicator name followed by a curved bracket.

Ex EMA( or T3(

Intellisense will then show you how to sequence the variables.

---------------------------------------------------------------------------

2 , For indicators with multiple outputs, I like to use build an automated strategy using the indicators in question along with the specific plot options.

Then I open the code and help myself to what I want.

--------------------------------------------------------------------------------

3 , If its a specific calculation, Give it its own plot series, then pick it up using instructions from 2.

------------------------------------------------------------------------------



RJay


Reply With Quote
  #4 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 482 since Jun 2009
Thanks Given: 232
Thanks Received: 416


Saroj View Post
whether a plot or a value calculated within the external indicator...

I've seen something either here or in NT forum, but can't find it in either forum nor in the Help Guide.

TIA, Saroj

Thanks, TAJ... I have some examples and finally got my darvas reference to work... but I feel like I'm incorporating a lot of unnecessary crap from copying others code not totally understanding what they are doing so I would like to really understand the essence of refering to a value in another indicator, like does it matter whether or not that indicator is on the chart...

Here's what I used to get 2 values I wanted from the Darvas indicator:

double darvasUpper = Darvas().Upper[0];
double darvasLower = Darvas().Lower[0];
darvasMid = darvasLower + (darvasUpper - darvasLower)/
2;

which was fairly clear because Upper and Lower are plots...

but what about when it is only a variable within the indicator?

I saw this code from something Mike posted...

if (DoubleMA(DMAzlema, NinjaTrader.Indicator.MAV.MAType.ZeroLagEMA, DMAadxvma, NinjaTrader.Indicator.MAV.MAType.ADXVMA).Signal[0] != 0)

why is it necessary to include "NinjaTrader.Indicator." before the indicator name?


Started this thread Reply With Quote
  #5 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 482 since Jun 2009
Thanks Given: 232
Thanks Received: 416


RJay View Post
Saroj,

I use three different methods to get the correct plot code/ variable sequence.

--------------------------------------------------------------------------

1 , use Intellisense. In editor, type in the indicator name followed by a curved bracket.

Ex EMA( or T3(

Intellisense will then show you how to sequence the variables.

---------------------------------------------------------------------------

2 , For indicators with multiple outputs, I like to use build an automated strategy using the indicators in question along with the specific plot options.

Then I open the code and help myself to what I want.

--------------------------------------------------------------------------------

3 , If its a specific calculation, Give it its own plot series, then pick it up using instructions from 2.

------------------------------------------------------------------------------



RJay

Thanks, RJay... I understand 1 & 2, but not #3... I understand what a plot series is but why that rather than a standard Data Series? Also, my question is how to get values from an existing indicator... what "calculation" are you refering to? one in the external indicator or one that has nothing to do with it...


Started this thread Reply With Quote
  #6 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 Vendor: www.innovative-trading-solutions-online.com 
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: ES
Posts: 687 since Jun 2009
Thanks Given: 765
Thanks Received: 789


Saroj View Post
Thanks, RJay... I understand 1 & 2, but not #3... I understand what a plot series is but why that rather than a standard Data Series? Also, my question is how to get values from an existing indicator... what "calculation" are you refering to? one in the external indicator or one that has nothing to do with it...

Saroj,

If its a specific calculation in the first indicator, Give it its own plot series in the first indicator.

follow instructions for step 2 to access first indicator from second indicator.

RJay


Reply With Quote
  #7 (permalink)
TAJTrades
Here, GA
 
Posts: 158 since Jun 2009
Thanks Given: 1
Thanks Received: 87

Saroj,

Just follow this example for Plots, IntSeries, BoolSeries and Variables. If I recall there are both Strategy Files and Indicator Files within the Zip to demonstrate how they all go together.

Indicator: Exposing indicator values that are not plots - NinjaTrader Support Forum


Reply With Quote
Thanked by:
  #8 (permalink)
 
roonius's Avatar
 roonius   is a Vendor
 
Posts: 131 since Jun 2009
Thanks Given: 20
Thanks Received: 298


Saroj View Post
if (DoubleMA(DMAzlema, NinjaTrader.Indicator.MAV.MAType.ZeroLagEMA, DMAadxvma, NinjaTrader.Indicator.MAV.MAType.ADXVMA).Signal[0] != 0)

why is it necessary to include "NinjaTrader.Indicator." before the indicator name?


It is not necessary - you can remove it.


Reply With Quote
Thanked by:
  #9 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 482 since Jun 2009
Thanks Given: 232
Thanks Received: 416


TAJTrades View Post
Saroj,

Just follow this example for Plots, IntSeries, BoolSeries and Variables. If I recall there are both Strategy Files and Indicator Files within the Zip to demonstrate how they all go together.

Indicator: Exposing indicator values that are not plots - NinjaTrader Support Forum

Thanks, TAJ... that's exactly what I was looking for... searched and searched for it in NexusFi (formerly BMT) and the NT forum this a.m. Wasn't using the right keywords apparently.


Started this thread Reply With Quote




Last Updated on October 21, 2009


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts