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 06-11-2012, 02:16 AM   #1
kalim
Member
 
Join Date: Jun 2012
Posts: 51
Thanks: 6
Thanked 0 times in 0 posts
Default Alert in Indicator or Market Analyzer?

I am trying to write some Alert for my Indicators. For example, RSI cross over overbought or oversold. Such basic alert are easily configurable in TradeStation or Multicharts. But I cannot find it in NinjaTrader.

The first instinct is for me to program it in Indicator. Expose it to properties for some configuration such as alert sound, etc.

However, I saw in forum many replies point to write the alert using another indicator, expose it to Market Analyzer for it to alert.

Before I start programming, I would like to ask for advice which route should I take? I am new to NinjaTrader.
kalim is offline  
Reply With Quote
Old 06-11-2012, 04:17 AM   #2
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello Kalim,
Welcome to the forum and I am happy to assist you.

You can easily code it as an indicator or you can also use the MA to do it.

Please refer here to know how to create an alert via the Market Analyzer
http://www.ninjatrader.com/support/h..._and_filte.htm


If you want to code an indicator then the below code demonstrates how to sound an alert if RSI crosses above 70.
Code:
if (CrossAbove(this.RSI(14,3), 70,1))
{
	Alert("Alert", Priority.High, "Rsi crossed above 70", "Alert1.wav", 10, Color.Blue, Color.White);
}

To learn NinjaScript please go through these help guide references first to get some basic knowledge.
http://www.ninjatrader.com/support/h...g_concepts.htm
http://www.ninjatrader.com/support/h...indicators.htm
http://www.ninjatrader.com/support/h...strategies.htm

Please let me know if I can assist you any further.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 06-11-2012, 05:11 AM   #3
kalim
Member
 
Join Date: Jun 2012
Posts: 51
Thanks: 6
Thanked 0 times in 0 posts
Default

Thanks for your quick response.

MA can do simple alert for indicator greater/less than, cross over/below. For more complex conditions, I think I will have to code it in indicator.

I am looking for the alert of an indicator Turning Up or Turning Down. For example, ADX/DM turning up or turning down, MA turning up or turning down. Can this be done in MA? If not, is there a function/method I can call in coding, something like crossover/crossbelow?
kalim is offline  
Reply With Quote
Old 06-11-2012, 05:32 AM   #4
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello kalim,
Yes, MA can only trigger simple conditions. For more advanced conditions you have to code your custom NinjaScript code.

Unfortunately there are no native Turn up or Turn down functions. You have to custom code any such functions.

Please let me know if I can assist you any further.
NinjaTrader_Joydeep 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
Alert indicator for Market Analyzer timokrates Indicator Development 2 09-01-2011 09:30 AM
Market analyzer sound alert forjoke Market Analyzer 1 10-12-2010 12:33 PM
Market Analyzer Alert Condition michi08 Version 7 Beta General Questions & Bug Reports 2 09-14-2010 11:02 AM
Market Analyzer alert not re-arming cassb Version 7 Beta General Questions & Bug Reports 15 04-19-2010 11:51 AM
Market Analyzer Alert Message jerryvellutini Indicator Development 25 11-09-2009 02:06 AM


All times are GMT -6. The time now is 03:31 PM.