How can I make a condition (like cross above/below) at a different time frame than the chart on a strategy. for example, I defined a 1 min time series and set the below condition but the stratgy does not work on a 5 min or different time. Please advise
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Conditions at different time frame
Collapse
X
-
Conditions at different time frame
Hello
How can I make a condition (like cross above/below) at a different time frame than the chart on a strategy. for example, I defined a 1 min time series and set the below condition but the stratgy does not work on a 5 min or different time. Please advise
Tags: None
-
Hello al.kooh,
Thanks for your post.
This would require unlocking the code of the strategy from the Strategy Builder by clicking the 'Unlock code' button and manually programming your strategy to suit your overall goals.
If the 5-minute data series is the first secondary series added to the script then this series would have a BarsInProgress value of 1. The primary data series the script is running on would have a BarsInProgress value of 0.
You would place all your logic that you want to process on the 1-minute series within a condition that checks if (BarsInProgress == 0). Then, place the logic you want to process on the added 5-minute series within a condition that checks if (BarsInProgress == 1).
Please see the help guide documentation below for more information.
AddDataSeries(): https://ninjatrader.com/support/help...dataseries.htm
BarsInProgress: https://ninjatrader.com/support/help...inprogress.htm
Working with Multi-Timeframe/Multi-Instrument NinjaScripts: https://ninjatrader.com/support/help...nstruments.htm
Also, review the SampleMultiTimeframe and SampleMultiInstrument reference samples that come default with NinjaTrader. To view these files, open a New > NinjaScript Editor window, open the Strategies folder, and click on the SampleMultiTimeFrame or SampleMultiInstrument file.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
81 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
46 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
66 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment