![]() |
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
|
|||||||
| Market Analyzer Support for the NinjaTrader Market Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jun 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
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);
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
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? |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
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.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |