Thanks a ton!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Builder - enter after 3 bars have closed up
Collapse
X
-
Strategy Builder - enter after 3 bars have closed up
My brain is fried after trying to get rich with the perfect strategy -- not that I could figure this out, anyway -- but how would I use Strategy Builder to enter long after 3 bars in a row have closed up?
Thanks a ton!
Tags: None
-
Hello Indy73,
Thanks for your post.
When you create the condition of Close > Open you can set the "Bars ago" value. So for 1 pair (Close>Open) the bars ago would be 0 (for the current bar), the next pair would be set to 1 for the previous bar and the last pair would be set to 2 for 2 bars ago. When all three conditions are true, the "Do the following" would be actioned.
Here is a screenshot of what the conditions would look like. Note that "Close" is replaced by "Default input" and this is expected when using the "Close" price.
-
I just mean I want my strategy to enter on the 3rd up bar that meets my criteria, but if it doesn’t meet my criteria by then, I don’t want to enter the trade.
For example, if I want to enter long on the 3rd bullish candle in a row when the MACD is above 0, I don’t want to enter if the MACD crosses 0 on the 4th green candle. That’s too late and I would rather wait for a pullback. I hope that makes sense
Comment
-
I understand that the MACD must be included, that's not my question though. However I think I figured it out.
See I'm using renko bars in my strategy and I wanted to make sure it was a maximum of 3 bullish bricks in a row for a long entry and a maximum of 3 bearish bricks for a short entry.
Hopefully this helps somebody in the future:
High[0} > High[1]
High[1] > High[2]
High[2] > High[3]
High[3] < High[4]
This ensures that I only enter on a specific pattern of 3 green bars after 1 red bar for a long entry and vice versa for a short entry when all other conditions are met.
Comment
-
Originally posted by NinjaTrader_PaulH View PostHello Indy73,
Thanks for your post.
When you create the condition of Close > Open you can set the "Bars ago" value. So for 1 pair (Close>Open) the bars ago would be 0 (for the current bar), the next pair would be set to 1 for the previous bar and the last pair would be set to 2 for 2 bars ago. When all three conditions are true, the "Do the following" would be actioned.
Here is a screenshot of what the conditions would look like. Note that "Close" is replaced by "Default input" and this is expected when using the "Close" price.
Hello,
I am trying to use NinzaRenko and program the reversal entry, so far I was able to use the Bars in a Row following the Close/Open pattern you provided. Is there a way to make it stop trading after it takes 1 trade in the same direction? For example, using your example it will wait up to 8 bars for the first entry but then after that it is repeatedly entering longs until the direction changes. I have tried to get it to trigger off EMA/SMA cross but it wont execute the trade.
Comment
-
Hello Chaos05,
Thank you for your post.
Can you clarify, when you say "stop trading in the same direction" - do you mean for the strategy to stop trading entirely, or prevent the strategy from entering in the same direction more than once? (i.e. only allow for flipping between long, short, long, short etc.)
Comment
-
Hi, I have currently fixed half the problem with a Group Condition to make it so that it won't take a 2nd long until after a short is taken, but what I really want is to have it so that if there are 8 bars in a row long, it takes 1 trade, then if there are say 4bars in a row short, it will reset back to being able to take a long after 8 bars long again. I have made some attempts to get it to reset after a small reversal then reverse back to long again.Originally posted by NinjaTrader_Gaby View PostHello Chaos05,
Thank you for your post.
Can you clarify, when you say "stop trading in the same direction" - do you mean for the strategy to stop trading entirely, or prevent the strategy from entering in the same direction more than once? (i.e. only allow for flipping between long, short, long, short etc.)
In this scenario, it could have be a losing long trade, then change to short for 3 bars which is not enough to trigger a short trade but then go back to 8 long bars so I want it to not take Longs immediately after a winning long, but make it wait until the direction changes then changes back and restarts the counter of 8 bars without having to have a short trade in between.
Comment
-
How would you add a print in Strategy Builder that prints the relevant information for all of the Close>Opens ?Originally posted by NinjaTrader_PaulH View PostHello Indy73,
Thanks for your post.
When you create the condition of Close > Open you can set the "Bars ago" value. So for 1 pair (Close>Open) the bars ago would be 0 (for the current bar), the next pair would be set to 1 for the previous bar and the last pair would be set to 2 for 2 bars ago. When all three conditions are true, the "Do the following" would be actioned.
Here is a screenshot of what the conditions would look like. Note that "Close" is replaced by "Default input" and this is expected when using the "Close" price.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
23 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
120 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
63 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
41 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
45 views
0 likes
|
Last Post
|

Comment