Need some help referencing a value of a secondary Time Series.... - NinjaTrader Programming | futures io social day trading
futures io futures trading


Need some help referencing a value of a secondary Time Series....
Updated: Views / Replies:1,117 / 6
Created: by forrestang Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Need some help referencing a value of a secondary Time Series....

  #1 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Need some help referencing a value of a secondary Time Series....

Howdy. I have been bashing my brains in trying to get this to work.

I simply want to create an indie that adds a secondary dataSeries to whatever chart the indie is added to. So say I have a 4r chart, I would like to add a secondary series in the indie of say 240 minutes, and plot the open of that 240min Data Series to the chart.

So what it would look like is shown in the picture below. Where each red line plotted is the Open of the new 4 hour bar that opens.

I have tried many things, I have tried to use the "Opens[0][0]" WITHIN the barsInProgress ==1. I have tried using a negative index in the barsinprogress==1.

This seems to be something simple that I am overlooking.

Also in the code, above I have added the the 240 minute dataSeries above.
 
Code
        protected override void OnBarUpdate()
        {	
			
			if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired )
        		return;

		
			if (secondaryOpen == null)
			{
				secondaryOpen = new DataSeries(SMA(BarsArray[1], 50));

			}
			
			// Executed on secondary bar updates only
			if (BarsInProgress == 1)
			{
				secondaryOpen.Set(Open[-1]);		//To Line bars up using -1 not 0?
				//return;
			}	
			
			// Executed on primary bar updates only
			if (BarsInProgress == 0)
			{
				
			}
			AnchorLine.Set(secondaryOpen[0]);

        }

Attached Thumbnails
Need some help referencing a value of a secondary Time Series....-prime2011-10-20_103850.jpg  
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Sydney Australia
 
Futures Experience: Advanced
Platform: SierraCharts, NT
Favorite Futures: ES,TF,CL, SPI,
 
Posts: 78 since Nov 2010
Thanks: 6 given, 23 received


"
"Opens[0][0]" WITHIN the barsInProgress ==1
"
I hope that the "Opens" is a spelling mistake
Shouldn't be that "Close[0][0]"
Good Luck

Reply With Quote
 
  #4 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


dlatbm View Post
"
"Opens[0][0]" WITHIN the barsInProgress ==1
"
I hope that the "Opens" is a spelling mistake
Shouldn't be that "Close[0][0]"
Good Luck

Hehe, I thought that was an error the first time I saw it too.

That feature is HERE. There is also a Lows, Highs and Closes as well. I think its the 'preferred' method of reference when working with multi-timeframe series.

Reply With Quote
 
  #5 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,220 since Jun 2009
Thanks: 628 given, 6,318 received
Forum Reputation: Legendary

spread indicator works with 2 series have you check it out?

Attached Files
Register to download File Type: zip Spread.zip (7.5 KB, 42 views)
Reply With Quote
 
  #6 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


cory View Post
spread indicator works with 2 series have you check it out?

I just tried this, tried using it on both the primary and secondary series on a chart, not sure what it does?

Reply With Quote
 
  #7 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

I have something workable. It seems to be off by a tic or two in certain places though.

But what I did was create a simple indicator that does nothing but capture the Open/HIgh/Low values and stores them as an exposed dataSeries. Why I have to do this I don't understand as those values should be readily available?

But then from my main script, passed the secondary DataSeries I have added to that simple indicator mentioned above, and capture that open value and plot it on a chart.

ugh.

Attached Thumbnails
Need some help referencing a value of a secondary Time Series....-prime2011-10-20_115959.jpg  
Reply With Quote

Reply



futures io > > > > > Need some help referencing a value of a secondary Time Series....

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
CTA - Series 3, Series 7, Series 9, Series 10, Series 56 NASD exams certifications Big Mike Traders Hideout 41 January 15th, 2015 10:27 AM
NT7 ES-09-11 ETH time series Angelo1 NinjaTrader 5 July 24th, 2011 10:45 AM
ChaosKit - chaotic time series analysis and prediction LukeGeniol The Elite Circle 9 September 5th, 2010 01:03 PM
Financial Time Series Analysis Method wh The Elite Circle 7 September 5th, 2010 06:59 AM
Multi-time series strategy in NT using different sessions? zwentz NinjaTrader Programming 1 April 2nd, 2010 08:20 AM


All times are GMT -4. The time now is 12:47 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-18 in 0.12 seconds with 20 queries on phoenix via your IP 54.196.201.241