![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
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
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
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.
Ryan M
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |