Multiple timeframes and max number of bars - EasyLanguage Programming | futures io social day trading
futures io futures trading


Multiple timeframes and max number of bars
Updated: Views / Replies:396 / 3
Created: by TraderWalrus 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
 

Multiple timeframes and max number of bars

  #1 (permalink)
Trading Apprentice
Bangkok Thailand
 
Futures Experience: Advanced
Platform: IB, MC, Python
Favorite Futures: Forex, CL, ES
 
Posts: 36 since May 2016
Thanks: 15 given, 15 received

Multiple timeframes and max number of bars

I use 1-minute interval as data1, 1 day interval as data2. Same instrument (USD.JPY in this case)

I need to access 2,000 bars back for code involving the 1 minute interval. I the 1 day interval to analyze the last 15 bar.

I get the error "Not enough series length" when I specify 2,000 as "maximum number of bars study will reference", unless I load 2,000 days of data. This is even for a trivial strategy that includes only the following code:

print ("d1",close of data1);
print ("d2",close of data2);

I don't need 2,000 days of data before the backtest period starts, is there a way to specify different "bars back" for the different intervals?


Last edited by TraderWalrus; October 24th, 2016 at 06:06 AM.
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)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,604 since Apr 2013
Thanks: 242 given, 896 received


TraderWalrus,

not that I am aware off, I am afraid MC requires the max bars back setting for all dataseries.
You could try to work around that by computing your higher timeframe out of the lower timeframe and not load a Data2 or by making the second dataseries available from a different chart using external DLLs.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Trading Apprentice
Chicago, IL
 
Futures Experience: Advanced
Platform: Multicharts + Tradestatio
Favorite Futures: CL
 
Posts: 6 since Oct 2015
Thanks: 0 given, 2 received

As an alternative to using the daily data as data2, you can eliminate data2 and build an array from your 1 minute bars using the closed(x), opend(x), highd(x), lowd(x), etc functions. This will eliminate the need to load 2000 days back of bars and also saves the need to have Data2 in your data feed.

I can do something like:

array:

ClosedDay[100](0),
OpenDay[100](0);

if currentsession(1) <> current session(1)[1] then begin

for x = 100 downto 2
ClosedDay[x] = ClosedDay[x-1]
OpenDay[x] = ClosedDay[x-1]
end;

ClosedDay[1] = closed(1)
OpenDay[1] = opend(1)

Now all of the daily data is contained in the array 100 days back, or 15 in your case. Easy Language has a battery of array functions that allow you to perform many of the common functions on arrays such as:

MvgAvg = AveragrArray(ClosedDay, 30);

Reply With Quote
The following user says Thank You to The9000 for this post:

Reply



futures io > > > > > Multiple timeframes and max number of bars

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Brett Steenbarger: Current Best Practices of Best Traders

Elite only

CME Group: Futures & Bitcoin

Elite only

Ran Aroussi: TBA [special time 11AM ET]

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accurate Transfer Trendlines Multiple TImeframes moneypenny NinjaTrader 0 May 1st, 2015 12:57 PM
Coding Multiple Timeframes in NT7 Rene NinjaTrader Programming 3 June 13th, 2014 10:30 AM
Horizontal Lines in Multicharts Multiple Timeframes hoolio MultiCharts 1 June 11th, 2014 06:38 AM
Timeframes with Range bars noyss Traders Hideout 9 September 13th, 2013 05:25 PM
How To Reference Close in Multiple Timeframes a2trader Elite EasyLanguage Automated Trading 9 July 21st, 2013 05:42 PM


All times are GMT -4. The time now is 10:42 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 2018-02-22 in 0.10 seconds with 19 queries on phoenix via your IP 54.90.119.59