Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Creating an indicator that will post on different chart type
Collapse
X
-
Creating an indicator that will post on different chart type
Is it possible to create an indicator that reads information on a 3 minute chart (looking for simple moving average cross up or down to show trend direction) and have this register on a Range chart. I want this to be a background color change when it occurs.
ThanksTags: None
-
Is there any examples off hand that we can take a look at?Originally posted by NinjaTrader_Bertrand View PostWelcome to our forums - yes that would be possible with our MultiSeries framework in NinjaScript for indicators and strategies :
http://www.ninjatrader.com/support/h...nstruments.htm
Comment
-
ij001, there are quite a few examples and some very helpful information in the link Bertrand posted. There are also multi-timeframe and multi-instrument strategy samples built into NinjaTrader. You can view these by going to Tools -> Edit NinjaScript -> Strategies -> SampleMulti...
I had a script very similar to the one requested in the first post, so I modified it a bit as a quick demonstration. It just reads data from the secondary data series (BarsInProgress index = 1) and plots it on the main data series.AustinNinjaTrader Customer Service
Comment
-
If i understand it corectly if you have any indicator and you add this line of codeOriginally posted by NinjaTrader_Austin View Postij001, there are quite a few examples and some very helpful information in the link Bertrand posted. There are also multi-timeframe and multi-instrument strategy samples built into NinjaTrader. You can view these by going to Tools -> Edit NinjaScript -> Strategies -> SampleMulti...
I had a script very similar to the one requested in the first post, so I modified it a bit as a quick demonstration. It just reads data from the secondary data series (BarsInProgress index = 1) and plots it on the main data series.
Add(PeriodType.Minute, 3);
then it will do the calculations based on 3 minutes, and then should it be applied to any other charts it should reflect the calculations of the 3 min even on a 5min 15 min Range Tick Volume charts
Is that correct because i seem to be having issues on some other script
maybe i missed some other line of code
Thank you
Comment
-
Hi richbois, that's not entirely correct - you simply add a series for access with this code snippet. I would then call the OnBarUpdate() method for each series added and each bar / tick - so if you do this unfiltered via any BarsInProgress logic it would create erratic results for you:
This lets you split the OnBarUpdate() call for each series, so you could for example do nothing for the second series by returning out if the OnBarUpdate(0) is called for it, thus you would though still have access to it's series data.
if (BarsInProgress != 0) return; // for any other series but the primary exit OnBarUpdate().
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
587 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
341 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
555 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment