Go Back   NinjaTrader Support Forum > NinjaTrader 8 > Platform Technical Support

Platform Technical Support General platform technical support for NinjaTrader 8.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 04-15-2018, 05:24 AM   #1
NinjaCustomer
Senior Member
 
Join Date: Jan 2008
Posts: 389
Thanks: 0
Thanked 5 times in 5 posts
Default Market Analyzer filter or alerts on 0 (not n/a)

I have an indicator with 2 plots... they work in tandem. In the data box it will show either 0 or n/a for either plot and each plot is the opposite of the other meaning if the first plot is 0 then the second is n/a and if the second is 0 then the first is n/a

How can I set up the market analyzer to filter or alert when a plot is 0? (but not n/a)

I'm asking because the columns I set up (I set up one column for each plot), always show 0.. both of them.. even though i know some values must be n/a

p.s. what is the code equivalent of n/a is it a null value?
NinjaCustomer is offline  
Reply With Quote
Old 04-15-2018, 11:44 PM   #2
NinjaTrader_AlanP
NinjaTrader Customer Service
 
NinjaTrader_AlanP's Avatar
 
Join Date: Apr 2016
Location: Denver, CO
Posts: 2,667
Thanks: 223
Thanked 574 times in 553 posts
Default

Hello NinjaCustomer,

Thank you for your note.

In your indicactor, what state are you making your AddPlot call, State.Configure or State.SetDefaults?

I look forward to your reply.
NinjaTrader_AlanP is offline  
Reply With Quote
Old 04-15-2018, 11:49 PM   #3
NinjaCustomer
Senior Member
 
Join Date: Jan 2008
Posts: 389
Thanks: 0
Thanked 5 times in 5 posts
Default

AddPlot calls are in SetDefaults
NinjaCustomer is offline  
Reply With Quote
Old 04-16-2018, 12:03 AM   #4
NinjaTrader_AlanP
NinjaTrader Customer Service
 
NinjaTrader_AlanP's Avatar
 
Join Date: Apr 2016
Location: Denver, CO
Posts: 2,667
Thanks: 223
Thanked 574 times in 553 posts
Default

Hello NinjaCustomer,

The recommended way for achieving this in NT8 would be using a custom MA column to access your indicator values / exposed states. Attached is an example which demonstrates this.

Import the attached .zip and on a Market Analyzer window, add the column AlanMAColumn.

In the NinjaScript Editor you can find AlanMAColumn under MarketAnalyzerColumns, which you can use as a guide for correctly displaying information to the MA window and which you can then reference for your alerts.

Please let us know if you need further assistance.
Attached Files
File Type: zip AlanMAColumn.zip (2.7 KB, 1 views)
NinjaTrader_AlanP is offline  
Reply With Quote
Old 04-16-2018, 12:21 AM   #5
NinjaCustomer
Senior Member
 
Join Date: Jan 2008
Posts: 389
Thanks: 0
Thanked 5 times in 5 posts
Default

thanks, where can I find the documentation to create my own custom column? that's not specifically about this issue - it just sounds interesting and i'd like to read about it
NinjaCustomer is offline  
Reply With Quote
Old 04-16-2018, 12:41 PM   #6
NinjaTrader_AlanP
NinjaTrader Customer Service
 
NinjaTrader_AlanP's Avatar
 
Join Date: Apr 2016
Location: Denver, CO
Posts: 2,667
Thanks: 223
Thanked 574 times in 553 posts
Default

Hello NinjaCustomer,

If your plots are always outputting 0 when you know it should be another value, it’s likely not set up correctly in the Market Analyzer which is why I suggest using the approach I provided.

Once you have the plots correctly displaying the value in the market analyzer window, you could write click on the MA>Alerts and define an action to go off when that column is displaying a value of 0.

I rewrote the sample I provide you so that it will display either a 1 or -1 in the MA column depending if the SMA of this bar is greater than its last bar. From here you could then set up an alert. I have provided screen shots of how you'd set up an alert for this.

The following section of our helpguide goes over setting up a market analyzer column,
https://ninjatrader.com/support/help...zer_column.htm

If you are still having trouble, and would like to upload the full code I can take a look, or if you'd prefer to email a copy, send to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and the files.

I look forward to your reply.
Attached Images
File Type: png MA1.PNG (32.4 KB, 1 views)
File Type: png MA2.PNG (35.4 KB, 2 views)
File Type: png ma4.png (16.2 KB, 2 views)
File Type: png ma5.PNG (83.9 KB, 2 views)
Attached Files
File Type: zip AlanMAColumn.zip (2.7 KB, 0 views)
NinjaTrader_AlanP is offline  
Reply With Quote
Reply

Tags
nt8 indicators analyzer

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
Market Analyzer do not filter, do not sort JustJoker Platform Technical Support 2 12-26-2016 09:19 AM
How to filter data in Market Analyzer toyogo00 Platform Technical Support 3 12-13-2012 02:37 PM
Market Analyzer filter murthymsr Platform Technical Support 1 12-14-2010 12:54 PM
True Custom Filter for Market Analyzer tonyh Platform Technical Support 3 03-03-2010 04:41 AM
Filter with Market Analyzer omares Platform Technical Support 1 09-25-2009 05:10 AM


All times are GMT -6. The time now is 11:46 PM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.