![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Mar 2008
Posts: 33
Thanks: 2
Thanked 2 times in 2 posts
|
I have created a simple moving average crossover strategy in the strategy wizard, but now I want to add a condition to it based on a 3rd slower sma? For example if the crossover is below the 3rd slower sma, I want to wait to enter until price closes beyond this 3rd ma and add a marker there. Thanks.
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Wilson,
When a crossover occurs, this would mean that both series are equal at one point. I would suggest just adding a condition for "if one of the sma's are below your third sma".
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Mar 2008
Posts: 33
Thanks: 2
Thanked 2 times in 2 posts
|
I did this in the wizard as I don't know programming. At what screen/point can I do this in the wizard? Thanks Adam.
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: May 2012
Posts: 16
Thanks: 2
Thanked 2 times in 2 posts
|
You can do it from the conditions and actions step.
Assuming you're using SMAs.... # Set 1 # Add # Indicators # SMA # Set the period or use the variable you defined earlier for the Fast MA # in the middle column set CrossesAbove # in the right column set SMA # Set the period or use the variable you defined earlier for the Slow MA # OK Now you have your fast MA crossing over the Slow MA. To make sure that the crossover is above the Confirmation MA: # Add # Indicators # SMA # Set the period for Fast MA # in the middle column set Greater Than # in the right column set SMA # Set the period or use the variable you defined earlier for the confirmation MA # OK And do the same thing for the Slow MA to make sure that it is also above the Confirmation MA.
Last edited by AXELGREASER; 06-30-2012 at 08:41 PM.
|
|
|
|
|
The following user says thank you to AXELGREASER for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with basic SMA Crossover strategy | kemosabe | Automated Trading | 9 | 04-26-2012 12:48 PM |
| SMA Crossover | ktinn | Strategy Development | 3 | 03-26-2012 05:07 AM |
| SMA CrossOver | tacticaltrader | General Programming | 2 | 09-21-2011 05:25 PM |
| SMA crossover | kaywai | Strategy Development | 13 | 12-21-2009 09:37 AM |
| making a sma crossover strategy quicker to enter and exit | GONZO | Strategy Analyzer | 3 | 12-10-2009 03:41 PM |