Multiple time frames - futures io
futures io futures trading



Multiple time frames


Discussion in MultiCharts

Updated
    1. trending_up 1,401 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Multiple time frames

(login for full post details)
  #1 (permalink)
Toronto Canada
 
 
Posts: 9 since Jan 2018
Thanks: 5 given, 1 received

I'm trying to use multiple time frames in my signal; All functions in the signal use the primary time frame but one function uses an secondary time frame on the same symbol. I've set up the secondary time frame in the format instruments but was wondering how to get this one function within the signal to use the secondary time frame. Do I need to set up the secondary time frame in the signal or do I do this in the function code. If so how can I do this. I understand that this code:
BarsOfData(2).Close[0] will utilize second time frame in relation to price but how can I get the function to use BarsOfData(2).

Reply With Quote

 
Best Threads (Most Thanked)
in the last 7 days on futures io
The Small Exchange (www.smallexchange.com)
106 thanks
Big Mike in Ecuador
85 thanks
How did you learn to trade?
58 thanks
Whos afraid of the big bad Glitch
51 thanks
NinjaTrader buys TransAct Futures (Infinity Brokers), plans its own FCM
34 thanks
 
(login for full post details)
  #2 (permalink)
Vendor
 
 
Posts: 2,225 since Apr 2013
Thanks: 406 given, 1,468 received

shamanov,

you need to tie functions to their respective data streams. This should get you going: https://www.multicharts.com/discussion/viewtopic.php?f=19&t=45848&p=100792&hilit=data2.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #3 (permalink)
Toronto Canada
 
 
Posts: 9 since Jan 2018
Thanks: 5 given, 1 received


I have my second chart hidden using a different time frame but same instrument, and I have a function trying to utilize this second time frame on the hidden chart will this function code utilize the second chart/data stream:

using System;

namespace PowerLanguage.Function
{
public class funciton : FunctionSimple<Double>
{
private sum m_summationfc1;



public funciton(CStudyControl ctx) :
base(ctx) {}

public funciton(StudyControl ctx, int data_stream) :
base(ctx, data_stream) {}

public ISeries<Double> price { get; set; }

public Int32 length { get; set; }


protected override void Create(){
m_summationfc1 = new sum(this);
int data_stream = 2;


}

protected override void StartCalc(){


}


protected override double CalcBar(){
return m_summationfc1[0] / 2;
}
}
}

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Toronto Canada
 
 
Posts: 9 since Jan 2018
Thanks: 5 given, 1 received

Are the 2 parameters of this function [this.TrueRangeSeries();] time and data stream. Would this function function use 30 minute time frame and second data stream:

this.TrueRangeSeries(30, 2);]

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Vendor
 
 
Posts: 2,225 since Apr 2013
Thanks: 406 given, 1,468 received

shamanov,

I don't think that you set the time frame with the input, as it's determined by the data stream (which is the second parameter). The first one is most likely bars back, although I'd suggest to test this so you are sure.

Regards,

ABCTG


shamanov View Post
Are the 2 parameters of this function [this.TrueRangeSeries();] time and data stream. Would this function function use 30 minute time frame and second data stream:

this.TrueRangeSeries(30, 2);]


Follow me on Twitter Visit my Facebook Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #6 (permalink)
W.Coast, USA.
 
Experience: Intermediate
Platform: Anything
Trading: Emini
 
Posts: 71 since Jul 2017
Thanks: 16 given, 48 received


ABCTG View Post
shamanov,

I don't think that you set the time frame with the input, as it's determined by the data stream (which is the second parameter). The first one is most likely bars back, although I'd suggest to test this so you are sure.

Regards,

ABCTG


are you able to access barsofdata(2) on a per tick basis when backtesting? I think the bar magnifier only applies to barsofdata(1), so even if you set the resolution to 1 tick, barsofdata(2) will always be on close or OHLC.

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Vendor
 
 
Posts: 2,225 since Apr 2013
Thanks: 406 given, 1,468 received

Arch,

that's correct when it comes to the bar magnifier or intra bar computations on higher data streams.

Regards,

ABCTG


Arch View Post
are you able to access barsofdata(2) on a per tick basis when backtesting? I think the bar magnifier only applies to barsofdata(1), so even if you set the resolution to 1 tick, barsofdata(2) will always be on close or OHLC.


Follow me on Twitter Visit my Facebook Reply With Quote


futures io Trading Community Platforms and Indicators MultiCharts > Multiple time frames


Last Updated on February 19, 2018


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge!

February
 

Battlestations!

March
     



Copyright © 2021 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