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
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:
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.Emily C.NinjaTrader Customer Service
-
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
-
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.
Emily C.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by pibrew, Today, 06:37 AM
|
0 responses
4 views
0 likes
|
Last Post
by pibrew
Today, 06:37 AM
|
||
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
14 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
11 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
16 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
Comment