Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
sma crossover strategy
Collapse
X
-
sma crossover strategy
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.Tags: None
-
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.Attached Files
Comment
-
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, 08:41 PM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by OllieFeraher, 05-09-2024, 11:14 AM
|
6 responses
18 views
0 likes
|
Last Post
by OllieFeraher
Today, 04:00 AM
|
||
Started by PaulMohn, 05-02-2024, 06:59 PM
|
2 responses
42 views
0 likes
|
Last Post
by PaulMohn
Today, 03:51 AM
|
||
Started by ETFVoyageur, Today, 02:10 AM
|
0 responses
10 views
0 likes
|
Last Post
by ETFVoyageur
Today, 02:10 AM
|
||
Started by rayyyu12, Today, 12:47 AM
|
0 responses
8 views
0 likes
|
Last Post
by rayyyu12
Today, 12:47 AM
|
||
Started by ETFVoyageur, 05-07-2024, 07:05 PM
|
17 responses
137 views
0 likes
|
Last Post
by ETFVoyageur
Yesterday, 11:27 PM
|
Comment