Thanks
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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
-
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
-
Originally 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().BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RubenCazorla, 08-30-2022, 06:36 AM
|
3 responses
77 views
0 likes
|
Last Post
by PaulMohn
Today, 04:44 AM
|
||
Started by f.saeidi, Yesterday, 12:14 PM
|
9 responses
23 views
0 likes
|
Last Post
by f.saeidi
Today, 04:39 AM
|
||
Started by Tim-c, Today, 03:54 AM
|
0 responses
3 views
0 likes
|
Last Post
by Tim-c
Today, 03:54 AM
|
||
Started by FrancisMorro, Today, 03:24 AM
|
0 responses
4 views
0 likes
|
Last Post
by FrancisMorro
Today, 03:24 AM
|
||
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
10 responses
1,772 views
0 likes
|
Last Post
by Leafcutter
Today, 03:01 AM
|
Comment