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 strategist007, Today, 07:51 PM
|
0 responses
2 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,968 views
3 likes
|
Last Post
by jhudas88
Today, 06:59 PM
|
||
Started by rbeckmann05, Today, 06:48 PM
|
0 responses
4 views
0 likes
|
Last Post
by rbeckmann05
Today, 06:48 PM
|
||
Started by rhyminkevin, Today, 04:58 PM
|
4 responses
58 views
0 likes
|
Last Post
by dp8282
Today, 06:13 PM
|
||
Started by iceman2018, Today, 05:07 PM
|
0 responses
6 views
0 likes
|
Last Post
by iceman2018
Today, 05:07 PM
|
Comment