Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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).
Can you help answer these questions from other members on NexusFi?
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;
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:
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.
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.