Thank you!
Announcement
Collapse
No announcement yet.
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).
-
Also, another way for the condition may be to indicate if the cross has happened within the last N bars (or individual N bars for each EMA) instead of just the current bar to make sure all your EMA's have crossed the SMA.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 NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
72 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
143 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
76 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
47 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
51 views
0 likes
|
Last Post
|
Comment