NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 04-02-2010, 02:51 PM   #1
rh017548
Junior Member
 
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default Strategy wizard questions

I am using the strategy wizard to develop a program. I can't seem to get two conditions to work. I want the conditions to be when the MACD's direction is "pointing up".

When using the condition builder i used macd then selected the double equal sign, then went to misc. and selected rising.

When I pressed ok it gave me an error about the "expressions not matching". I would to make aother condition based on the directions of the indicators at a particular moment. Please help.
rh017548 is offline  
Reply With Quote
Old 04-02-2010, 03:02 PM   #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 rh017548,

Welcome to our forums.

Please see the reference sample below for using Rising and Falling conditions in the strategy wizard.
http://www.ninjatrader-support2.com/...ad.php?t=19384
NinjaTrader_RyanM is offline  
Reply With Quote
Old 04-05-2010, 01:17 PM   #3
rh017548
Junior Member
 
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for the reply ryan.
So I read the file you provided, and this is the code I came up with:

if (Rising(MACD(12, 26, 9) .Avg[1]) == true
&& Rising(CCI(14)[1]) == true)

is this correct for "" The MACD and the CCI have to be rising "pointing up"?

thanks
rh017548 is offline  
Reply With Quote
Old 04-05-2010, 01:55 PM   #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, a rising condition will compare its value to it previous value.

In your example though, you are using an index, which would be looking for a double input. You don't need the [1] in either statement.
NinjaTrader_RyanM 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
NinjaScript Strategy Wizard questions tomgilb Automated Trading 11 09-29-2009 10:06 AM
the strategy wizard wont close after the strategy is edited successfully MoreYummy Miscellaneous Support 4 09-08-2009 07:21 PM
Strategy: Using Rising and Falling conditions in the Strategy Wizard NinjaTrader_Josh Reference Samples 0 08-05-2009 01:43 PM
Strategy: Using User Variables in the Strategy Wizard NinjaTrader_Josh Reference Samples 0 03-23-2009 09:41 AM
Strategy wizard & existing ATM Strategy thepcmd ATM Strategies (Discretionary Trading) 12 05-16-2008 07:15 AM


All times are GMT -6. The time now is 07:44 AM.