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 > Application Technical Support > Market Analyzer

Market Analyzer Support for the NinjaTrader Market Analyzer.

Reply
 
Thread Tools Display Modes
Old 02-21-2011, 10:23 AM   #1
HJBaggaley
Junior Member
 
Join Date: Jun 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Default Donchian Alert NT7

I am trying to work out how to set an alert via the MA for when the price crosses Donchian mean line. Can anyone point me in the right direction please.
It gets really messy to set up a strategy across several currency pairs and time frames, plus NT does not seem to cope well with the extra workload, so thought it should be fairly easy to set it up on MA.
HJBaggaley is offline  
Reply With Quote
Old 02-21-2011, 10:37 AM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello HJBaggaley,

Yes, the market analyzer is good for checking conditions across a group of instruments. A common approach for alerting or filtering is setting plot as 1 when conditions are true and 0 otherwise. You can then check any alerting when that column == 1.

if (CrossAbove(Close, DonchianChannel(14).Mean, 1))
{
Plot0.Set(1);
}

else
Plot0.Set(0);
NinjaTrader_RyanM is offline  
Reply With Quote
Old 02-21-2011, 10:42 AM   #3
HJBaggaley
Junior Member
 
Join Date: Jun 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Default Help

Thanks for your prompt reply. Sorry to sound a bit thick,. The only 'plot' in MA gives a choice of Mean, Lower or Upper.
I have to then assume you are suggesting 'writing' a code for the MA?
HJBaggaley is offline  
Reply With Quote
Old 02-21-2011, 10:46 AM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Yes, setting crossover alerts with another indicator and price requires custom programming. The snippet included in my first reply will do this. Click Tools > New > NinjaScript > Indicator
Walk through the wizard and then paste that snippet in the Indicators OnBarUpdate() section.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 02-21-2011, 11:40 AM   #5
HJBaggaley
Junior Member
 
Join Date: Jun 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Default Not programmer......

Thanks for that
It was not really the answer I was looking for as I am not a programmer and although I have tried to follow your notes, and in the past the copious help guides to no avail, I am obviously doing something wrong as I keep getting error messages.
I was thinking that there should be a way of setting this up within MA itself rather than taking a masters in simple programming.

Thanks anyway.
HJBaggaley 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
donchian channel alert Eduard Strategy Development 1 01-22-2010 11:31 AM
Donchian Channel Helicopter Indicator Development 6 08-31-2009 01:14 PM
Donchian Channel Helicopter Strategy Development 2 08-31-2009 09:46 AM
Donchian channels zq655 Charting 3 07-18-2008 08:38 AM
Donchian MrBaffalo Indicator Development 4 09-03-2007 11:35 AM


All times are GMT -6. The time now is 05:48 AM.