NexusFi: Find Your Edge


Home Menu

 





Accessing Hidden Indicator Conditions


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one KenB with 8 posts (1 thanks)
    2. looks_two max-td with 7 posts (0 thanks)
    3. looks_3 Big Mike with 2 posts (0 thanks)
    4. looks_4 TAJTrades with 2 posts (2 thanks)
    1. trending_up 9,081 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 20 posts
    2. attach_file 1 attachments




 
Search this Thread

Accessing Hidden Indicator Conditions

  #11 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

BTW - i think that you need a real plot is not 100% right.
the dataseries does it also.

oh sorry, forgot the wizard-aspect - for using it in wizard you need a plot.

max-td
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
About a successful futures trader who didnt know anythin …
Psychology and Money Management
REcommedations for programming help
Sierra Chart
What broker to use for trading palladium futures
Commodities
ZombieSqueeze
Platforms and Indicators
 
  #12 (permalink)
TAJTrades
Here, GA
 
Posts: 158 since Jun 2009
Thanks Given: 1
Thanks Received: 86

I may be missing what you are trying to accomplish but there is a sample script on the NT Forum that explains how to expose variables and series that are NOT Plots so that other strategies and indicators can have access to them.. Indicator: Exposing indicator values that are not plots - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

I use those concepts in some things I have developed.

Reply With Quote
Thanked by:
  #13 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927


yeah, good example for the bools !
but maybe they are not "wizard-compatibel"

and instead of boolseries you can also use dataseries in the same wy - look at this DMa-code.

it has a dataseries calles Signal, that is used in the way you look for i think.

just search in the code for Signal and you see how its used in each section.

EDIT :
OK -- correction , sorry -- you really have to use plots if you want to use the wizard i think

max-td
Attached Files
Elite Membership required to download: DoubleMA.cs
Reply With Quote
  #14 (permalink)
KenB
Boynton Beach, FL
 
Posts: 9 since Jul 2010
Thanks Given: 0
Thanks Received: 1

Thanks Max, I appreciate it.

Reply With Quote
  #15 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

but hey

if you dont wanna go with plots + you are able to modify your indicators, you are also able to modify your strategy !

you can do the main strat in the wizard but you use a dummy that has a plot instead of the dataseries you like to use later - lets say you use 'EMA(5) as where "Signal" is used later
+ code something like : if EMA5 > 1 --- blabla

then you compile your strategy and later you open it via editing + add your dataseries instead of the ema-dummy !

if your indicator is called kenny01, your Signal-dataseries is called as kenny05(parameters... ) .Signal [x]

thats basicly how it can be done.

the wizard is helpful for some steps, but also blocks some functions -- so mix it !

max-td
Reply With Quote
  #16 (permalink)
KenB
Boynton Beach, FL
 
Posts: 9 since Jul 2010
Thanks Given: 0
Thanks Received: 1

I have read the tutorial on exposing boolseries and have successfully added this procedure to the DoubleMA and used it in one of my strategies. However for me it is too time consumming. I would rather edit an indicator with the Script Editor and add "Plots" so that I can keep using the wizard with my strategy and keep my focus on trading not programing. I'm sure once I learn how to add a plot correctly to the DoubleMA for example I will be able to apply the same principle to other trend indicators.

I understand adding the plot to Initialize(), but not sure about the min/max, or setting the plot value. The DoubleMA is a perfect example.

thanks


Reply With Quote
  #17 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

hey ken,
is this a question now or are you done with it ?

if its still a question, please let me know.

max-td
Reply With Quote
  #18 (permalink)
KenB
Boynton Beach, FL
 
Posts: 9 since Jul 2010
Thanks Given: 0
Thanks Received: 1

The question is the same: to access an indicator's (like DoubleMA) trend conditons from the strategy wizard, what plot code needs to be added to Initialize(), OnBarUpdate(), and Properties in the Indicator's code? It's really a pretty simple question. I was at a Ninja strategy development webinar yesterday and it was a frequent question of many people.

Reply With Quote
  #19 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

hm - lol - dont know why we dont come to a result ...

NT couldnt answer this ?

try this : https://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?Overview21

it goes through some pages with the small arrows upper right corner.

play this tutorial to get the basics about plots.
it gives you a good + simple example. - no frills in there.

if you have this plot working, you have to make some different definition of it - that is whats happening in the OnBarUpdate(),-section.

you want to have 3 different definition (+1 / 0 / -1 ) - this must be made with if .... logics

also maybe move it in panel 2.

try it and post what you have if its not working - that will be a piece we can work on
also post it if its working - its a good example then for others !

max-td
Reply With Quote
  #20 (permalink)
TAJTrades
Here, GA
 
Posts: 158 since Jun 2009
Thanks Given: 1
Thanks Received: 86


Going of memory here.

To expose a Series (Int, String, Bool, Data.......)
Pay close attention to the "M" or "m" in the IntSeries midLineDirection.



In Variables Section:
private IntSeries midLineDirection;

In Initialize():
midLineDirection = new IntSeries(this); // 1 = Rising. 0 = Flat, -1 = Falling

In OnBarUpdate:
Perform whatever calcs are needed to set the midLineDirection.Set(-1);


In Properties:
[Browsable(false)]
[XmlIgnore()]
public IntSeries MidLineDirection
{
get { return midLineDirection; }
}

This should allow access the midlinedirection for you to use in the strategy Builder

Reply With Quote




Last Updated on September 29, 2010


© 2024 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 - Privacy Policy - Downloads - Top
no new posts