Thank you!
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
Moving Average Ribbon Strategy
Collapse
X
-
Moving Average Ribbon Strategy
I am trying to create a strategy where a group of EMA's must all close above/below a single SMA before a buy/sell order is triggered. Using Strategy Builder, I listed all of the EMA's (crossing above and below SMA) with the If All condition selected---simple enough, but the strategy does not work. Any ideas on what I am doing wrong?
Thank you!Last edited by markps400; 02-14-2018, 05:37 PM.Tags: None
-
Hello markps400,
Thanks for your post.
The cross conditions you have created would require that all of them (EMAs) cross the SMA on the same bar. I would expect that it would be unusual that all of the EMAs would crossbelow (or crossabove) the SMA 50 on the same bar. If you plot these on a chart you can see that this does not occur frequently, if at all.
If the requirement is to have all the EMAs cross the SMA 50 then it would seem that you need only check that the EMA(20) has cross above/below the SMA(50) because the EMA(2) leads the EMA(4) which leads the EMA(6), etc etc.until you get to the slowest EMA(20).Paul H.NinjaTrader Customer Service
-
Originally posted by markps400 View PostI am trying to create a strategy where a group of EMA's must all close above/below a single SMA before a buy/sell order is triggered. Using Strategy Builder, I listed all of the EMA's (crossing above and below SMA) with the If All condition selected---simple enough, but the strategy does not work. Any ideas on what I am doing wrong?
Thank you!
Comment
-
Hello, I have a somewhat related question but figured I would add to this thread for sake of posterity...
When creating an automated strategy using the moving average ribbon, how do I indicate whether all the moving averages are stacked positive or stacked negative? I simply entering in the strategy builder equals "rising" for stacked positive and "falling" for stacked negative but neither worked. Unfortunately no luck either with "true" and "false."
Any suggestions greatly appreciated!Last edited by gravityflyer; 06-05-2022, 10:37 AM.
Comment
-
-
Hello gravityflyer,
You would need to make an indicator that calls these SMA calls and add plots and public Series<double> to return the Values[plot index], and set the Values[plot index][barsAgo index] to the value of those SMAs. Then you could call your indicator in your strategy with these preset SMA values.
I'm trying to expose my variables to the strategy builder so everyone can have better use of the WaveTrend indicator (it has a lot of code). Explain this to me like I am 5 because this isnt the first time I've tried to figure it out and hit a wall. What is Series? I know its like an array that stores bars. Why not just call it
As a heads up, the attachment in your post #1 is a strategy and not indicator.Last edited by NinjaTrader_ChelseaB; 06-06-2022, 03:11 PM.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, 04-17-2024, 06:40 PM
|
6 responses
49 views
0 likes
|
Last Post
by algospoke
Today, 06:18 PM
|
||
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
11 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
21 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
Comment