I am struggling set a strategy to open a position Nth bar after the conditions are met in Strategy builder. Can someone please provide me with step by step building the strategy for a simple MA crossover? Appreciate your helo
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Open a position after Nth bar
Collapse
X
-
Open a position after Nth bar
Hello
I am struggling set a strategy to open a position Nth bar after the conditions are met in Strategy builder. Can someone please provide me with step by step building the strategy for a simple MA crossover? Appreciate your heloTags: None
-
Hello al.kooh,
Welcome to the NinjaTrader forums!
To count or do any math in the Strategy Builder it is necessary to use a Series with an offset. The offset is where arithmetic can be performed.
Below is a link to an example of counting bars in the Strategy Builder.
with regard to the attached image: Line A is an indicator Line B is the m period MAX of line A Line C is an average of this indicator A Line D is another average of this indicator A is it possible, possibly using the strategy builder, but without adding a temporary variable, to set on the condition: line C crosses below line D
As well as a link to a video on using the offset with Series.
Chelsea B.NinjaTrader Customer Service
-
Thanks for the response. It was complicated and a separate strategy. Not sure how to use it in my strategy. Is there any crossover/under strategy procedure for Nth bar after the conditions are met available?Originally posted by NinjaTrader_ChelseaB View PostHello al.kooh,
Welcome to the NinjaTrader forums!
To count or do any math in the Strategy Builder it is necessary to use a Series with an offset. The offset is where arithmetic can be performed.
Below is a link to an example of counting bars in the Strategy Builder.
https://ninjatrader.com/support/foru...on#post1078538
As well as a link to a video on using the offset with Series.
https://drive.google.com/file/d/1lwj...usp=drive_linkLast edited by al.kooh; 06-21-2023, 09:16 PM.
Comment
-
Hello al.kooh,
Add a series. On each new bar set the series value to the previous bar's value with an offset of adding 1. This will count the number of bars.
In a different condition trigger the action when the series value is N. Then set the series value to 1 to reset it.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
45 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
21 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
31 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|
Comment