Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Delayed Entry Signal
Collapse
X
-
Delayed Entry Signal
I am trying to build a strategy built around a few factors. The first is when the red and blue line (in the image below) cross above a threshold, let's say 30 (the yellow line in the image below). Then I'm looking for when the red line crosses below the blue line and them at some point in the future crosses the next threshold of say 25 (the Teal line in the image below). i can't seem to figure out how to get the strategy builder to include the teal line cross without a "number of bars" input. Is there a way to leave it open ended? In the example below it is 6 bars, but it will be different every time.
Tags: None
-
Hello ageeholdings,
Thank you for your post!
To clarify, you want to only enter if all the following have occurred:- when the red and blue line (in the image below) cross above a threshold (the yellow line)
- when the red line crosses below the blue line
- at some point in the future crosses the next threshold of say 25 (the Teal line in the image below)
Are you using crossabove or crossbelow conditions?
CrossAbove/Below needs a number for the lookback period, so there is no way to leave this "open ended" unfortunately. If you specify 25 for the lookbackPeriod, then it will which if a cross occured within the last 25 bars.
If you're looking to delay your entry by a number of bars, i.e. check if the conditions happened and then enter x bars later, please see this forum post which has an explanation as well as an example script:
Hi, I have an issue with my automated strategy. I use CCI as my entry point, when it crosses the 0 line. The thing is I'd like my entry to be on the 5th candle after the crossover. I used a value of 5 as the look back period, but the strategy still taking orders on the crossover candle I appreciate your help Screenshot_17.png
Please let me know if this does not guide you in the right direction.Last edited by NinjaTrader_Gaby; 05-01-2024, 07:22 AM.
-
That is correct. I want all of those things to happen, but i am unsure of when or how long it will take to happen.
I anticipate the red and blue line (in the image below) cross above a threshold (the yellow line) will occur first and then the red line crosses below the blue line. After those occur, i am looking for the final condition to happen, which will trigger the trade. I don't want it to look back just 6 bars. I want it to occur when it happens. I do not know how many bars it will be.
Comment
-
Hello ageeholdings,
You can specify the lookbackPeriod to be 1, it will check if the condition happened within the last bar. There is no way to know when the condition is going to occur since we can't predict the future. The set will check for every bar update if the condition has occurred. You can specify in the actions that when this condition is true, to submit your entry order.
Please let us know if you have any further questions.
Comment
-
Slightly different question... how do i setup a spread condition. For example, using the original image above, if i want the red bar to be above the blue bar by a numeric number of 3, how do i setup that condition?
Comment
-
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
49 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
67 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|
Comment