trouble adding new time series for different futures contract - NinjaTrader Programming | futures io social day trading
futures io futures trading


trouble adding new time series for different futures contract
Updated: Views / Replies:528 / 7
Created: by jordis Attachments:0

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
 

trouble adding new time series for different futures contract

  #1 (permalink)
Elite Member
Mobile, Alabama
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
Favorite Futures: Stocks
 
Posts: 29 since Sep 2011
Thanks: 6 given, 4 received

trouble adding new time series for different futures contract

I am having difficulty adding a time series for the YM contract to my strategy running on ES.

So:
- Strategy is running on ES 12-13
- I want to add the YM 12-13 contract in order to make a few references
- Found in NT7 manual where it looks like I should just have to type the following:
 
Code
Add("YM 12-13", PeriodType.Day, 1);
However, this doesn't work when I try to reference this later in the strategy via:

 
Code
ATR(BarsArray[1], 14)[0] < 200
- If I remove the BarsArray reference, and instead check the ATR for the main instrument (ES), the strategy will execute trades. However, if I do it the above way and try to reference the YM contract no trades are ever executed.



Can anyone help enlighten me as to why I can't seem to reference the YM contract within my code running on ES? Any suggestions are welcome. I'm sort of lost on this one...



Thanks in advance,
jordis







edit: might it have something to do with referencing the 12-13 contract and not the continuous contract? Is it possible to reference the continuous contract?


Last edited by jordis; November 20th, 2013 at 01:37 PM. Reason: add comment
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
Cedar Rapids, iowa
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Ninjatrader - Continuum
Favorite Futures: 6E, TF, 6J
 
Tasker_182's Avatar
 
Posts: 626 since Aug 2009
Thanks: 426 given, 1,126 received



jordis View Post
I am having difficulty adding a time series for the YM contract to my strategy running on ES.

So:
- Strategy is running on ES 12-13
- I want to add the YM 12-13 contract in order to make a few references
- Found in NT7 manual where it looks like I should just have to type the following:
 
Code
Add("YM 12-13", PeriodType.Day, 1);
However, this doesn't work when I try to reference this later in the strategy via:

 
Code
ATR(BarsArray[1], 14)[0] < 200
- If I remove the BarsArray reference, and instead check the ATR for the main instrument (ES), the strategy will execute trades. However, if I do it the above way and try to reference the YM contract no trades are ever executed.



Can anyone help enlighten me as to why I can't seem to reference the YM contract within my code running on ES? Any suggestions are welcome. I'm sort of lost on this one...



Thanks in advance,
jordis







edit: might it have something to do with referencing the 12-13 contract and not the continuous contract? Is it possible to reference the continuous contract?



I am taking a guess here but I think your problem lies with:
 
Code
ATR(BarsArray[1], 14)[0] < 200
try
 
Code
ATR(BarsArray[1], 14)Closes[0] < 200

"Money is better than poverty, if only for financial reasons." - Woody Allen
Reply With Quote
 
  #4 (permalink)
Elite Member
Mobile, Alabama
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
Favorite Futures: Stocks
 
Posts: 29 since Sep 2011
Thanks: 6 given, 4 received

I tried

 
Code
ATR(BarsArray[1], 14)Closes[0] < 200
but ninja wont let that compile. I get a long list of errors. Is there a different way that needs to be typed possibly?

Reply With Quote
 
  #5 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,336 since Dec 2012
Thanks: 11,276 given, 7,090 received

@jordis, your original code looks ok, is the strategy running in an ES Day chart as well?, otherwise there may not be enough data for YM loaded if you're in (e.g.) a 5min ES chart, (increase bars/days for the chart if so). Also is the 'less than 200' test what you want? I assume you change the numbers when you run it against the ES series?

Travel Well
Reply With Quote
 
  #6 (permalink)
Elite Member
Mobile, Alabama
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
Favorite Futures: Stocks
 
Posts: 29 since Sep 2011
Thanks: 6 given, 4 received

Is there maybe a way to make a custom indicator that would only look at YM instead of ES? maybe then I could just plot that indicator and use it in the strategy instead of trying to directly reference the YM series.


still open for suggestions.



Also, I tried

 
Code
ATR(Closes[1], 14)[0] < 200

and had no luck either.



thanks again,
jordis

Reply With Quote
 
  #7 (permalink)
Elite Member
Mobile, Alabama
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
Favorite Futures: Stocks
 
Posts: 29 since Sep 2011
Thanks: 6 given, 4 received


ratfink View Post
@jordis, your original code looks ok, is the strategy running in an ES Day chart as well?, otherwise there may not be enough data for YM loaded if you're in (e.g.) a 5min ES chart, (increase bars/days for the chart if so). Also is the 'less than 200' test what you want? I assume you change the numbers when you run it against the ES series?


ill try these things and see.


basically the 200 is arbitrary. but I have an active strategy running fully automated on YM that is currently quite profitable, and I just want to run the same basic strategy on ES to see if it works there as well. however, the atr filter i use for YM cannot be easily converted over for ES, so I just wanted to "not trade" based on my YM filter, instead of trying to re-write that filter based off of ES numbers.


sounds convoluted I know, it's just frustrating me that I can't get this little test to run.


Thanks,
jordis

Reply With Quote
The following user says Thank You to jordis for this post:
 
  #8 (permalink)
Elite Member
Mobile, Alabama
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
Favorite Futures: Stocks
 
Posts: 29 since Sep 2011
Thanks: 6 given, 4 received

still no luck.

i went ahead and got it to work about 80% just by taking this part out, but i would still like to figure out this reference issue


does anyone have any ideas for how criteria completely based on one instrument could execute trades inside another instrument? ie. signals are 100% generated from YM, but executed on ES? That's sort of what I thought I could do here, but I've failed miserably.

thanks again,
jordis

Reply With Quote

Reply



futures io > > > > > trouble adding new time series for different futures contract

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

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
trouble adding new time frame to strategy jordis NinjaTrader Programming 12 September 18th, 2014 03:58 AM
Hollywood Movies Futures contract (seriously) Big Mike Traders Hideout 8 April 24th, 2014 01:52 PM
No one really trades futures contract using daily chart due to changes on contract? Azharr Beginners and Introductions 2 September 30th, 2013 12:14 AM
Futures Contract Specifications - How long is the life of a contract ? trendisyourfriend Traders Hideout 11 November 14th, 2010 10:34 AM


All times are GMT -4. The time now is 07:34 AM.

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-11 in 0.12 seconds with 19 queries on phoenix via your IP 54.226.132.197