Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Builder EMA cross not touching bars
Collapse
X
-
Strategy Builder EMA cross not touching bars
I'm hoping someone can help me with the strategy builder. I want to modify my EMA crossover strategy to only fire if the crossover occurs 3 - 6 bars after it's not touching any wicks or bars. I don't know how to program this in the strategy builder. I'm including an image of when I want the EMA to be valid. Thanks for your help. Mitch
Tags: None
-
Hello mmenigma,
Thank you for your reply.
To check if the EMAs crossover and also that they are not touching any bars for the last 3-6 bars, you would need to make comparisons between the EMA values and the High and/or Low prices of the bars. For example, this is a condition that checks if an EMA with a period of 7 crosses above an EMA with a period of 14 and if each of the EMAs was greater than the High price for 0 bars ago, 1 bar ago, 2 bars ago, and 3 bars ago. This is just to give you an idea so that you could add similar conditions into your own strategy:
World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.
As a tip, once you have a condition set up you may right-click the condition and select "Copy" then right-click again and select "Paste" to paste the copied condition. Then, you can simply edit the condition to modify something such as the period value or the number of bars ago.
Please let us know if we may be of further assistance.
-
Thanks Emily, This is what you're talking about? I don't need think I need to set both TEMA's if one is good enough to satisfy my needs. I also have times settings and an RSI condition in there too but that should not affect these conditions. For ease of copying and pasting, could I put the TEMA cross and the following 4 conditions into a group instead of all separate as seen here?
Last edited by mmenigma; 03-12-2024, 04:43 PM.
Comment
-
To understand what values are being compared in your conditions and why the strategy does or does not submit orders as expected, you can add print statements as an "Action" on the Conditions and Actions screen. You may also enable TraceOrders on the "Default Properties" screen of the builder to get information about whether orders are ignored, submitted, changed, canceled, rejected, etc. Both of these tools send information to the Control Center > New > NinjaScript Output window that you may review to get more insight into your strategy's behavior. For more information about these tools, please see the links below:Originally posted by mmenigma View PostI tried various different variations of this and it's not firing at all. I remove the EMA>High and it fires on all crossovers. If i add just one EMA>High the strategy fails completely. I tired using close instead of High and that didn't work either.- https://support.ninjatrader.com/s/ar...language=en_US
- Video about adding prints in Strategy Builder - https://drive.google.com/file/d/1CCl...gEIwJKv6L/view
Please let us know if we may be of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
53 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
70 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment