![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
|
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.
Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
Welcome 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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Apr 2010
Posts: 125
Thanks: 18
Thanked 3 times in 3 posts
|
Quote:
|
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 90 times in 82 posts
|
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.
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#5 | |
|
Member
Join Date: Jan 2009
Posts: 67
Thanks: 7
Thanked 2 times in 2 posts
|
Quote:
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 |
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
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:
http://www.ninjatrader.com/support/h...inprogress.htm 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().
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
|
|
#7 |
|
Member
Join Date: Jan 2009
Posts: 67
Thanks: 7
Thanked 2 times in 2 posts
|
Thank you Bertrand that solved the problem second line was missing
One last question can a Session Template be used in the calculation of the 3min charts then the results used on a 24/7 R or T chart Thanks again |
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
Great, you're welcome - so cash hour based indicator values but running of a electronic hours chart? That would need more advanced custom coding unfortunately.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
|
|
#9 |
|
Member
Join Date: Jan 2009
Posts: 67
Thanks: 7
Thanked 2 times in 2 posts
|
|
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
Thanks, enjoy yours as well!
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Certified NinjaScript Consultant
|
I'm a programmer and I'd be interested in giving you a quote on this project. I've been wanting to do something similar over the last few days. Let me know!
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Want to read S/R lines and post on chart | saroj | Indicator Development | 2 | 05-05-2009 11:45 AM |
| Creating an indicator from different tick chart data | kevinh786 | Indicator Development | 1 | 01-16-2009 09:14 AM |
| auto set chart type and interval by indicator | Creamers | Indicator Development | 1 | 08-02-2008 11:53 AM |
| How to post a New Indicator | LG | NinjaScript File Sharing Discussion | 2 | 04-18-2008 04:21 PM |
| Indicator: Creating a user-defined parameter type (enum) | NinjaTrader_Josh | Reference Samples | 0 | 09-24-2007 09:12 PM |