Multiple Time Frame Signal Strategy

Questions about MultiCharts and user contributed studies.
shadrock55
Posts: 51
Joined: 24 Feb 2011
Location: Atlanta, GA
Has thanked: 5 times
Been thanked: 8 times

Multiple Time Frame Signal Strategy

Postby shadrock55 » 28 Dec 2013

I have an odd issue. I am using three data series.

Series 1 = 200 Bars
Series 2 = 1,000 Bars
Series 3 = 15,000 Bars

I initially wrote the strategy with just Series 2 and Series 3, and I got it to compile and run successfully. I then decided to add a lower data series (Series 1), so that I could get a better view of the bars. I tried to match the results that I had before adding the lower data series, but I have been unable to do so.

Here is the issue. I have the following code.

If Condition1 and Condition2 and Condition3 then buy next bar high stop;

Series 1 bar hits and Condition 1: False ; Condition 2: False; Condition 3: False;
Series 2 bar hits and Condition 1: True ; Condition 2: True; Condition 3: True;
Series 3 bar hits and Condition 1: True ; Condition 2: True; Condition 3: True;

The Conditions are now all True, but the trade does not trigger a buy on the next bar in the Series 1 time frame. Instead, it appears to completely ignore the order to buy on the next bar.

I have confirmed that
1. The conditions are true and that the line with the entry text is being read. The buy stop has been submitted for the next bar.
2. Trades where Series 1 occurs in a different sequence appears to trigger.

It appears to be because the condition changes on a higher time not the lowest time frame. Its almost like the next bar is the bar after the one that I expect.

Is this a known issue? Is there something I can do to correct it?

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Multiple Time Frame Signal Strategy

Postby TJ » 28 Dec 2013

you should always use the fastest chart resolution as the data1.

eg.
data1 = 1 min
data2 = 5 min

shadrock55
Posts: 51
Joined: 24 Feb 2011
Location: Atlanta, GA
Has thanked: 5 times
Been thanked: 8 times

Re: Multiple Time Frame Signal Strategy

Postby shadrock55 » 28 Dec 2013

I should be fine there. 200 is the lowest resolution.

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Multiple Time Frame Signal Strategy

Postby TJ » 28 Dec 2013

I should be fine there. 200 is the lowest resolution.
What is "200 Bars"?

Not "lowest resolution", but you need the fastest resolution.

shadrock55
Posts: 51
Joined: 24 Feb 2011
Location: Atlanta, GA
Has thanked: 5 times
Been thanked: 8 times

Re: Multiple Time Frame Signal Strategy

Postby shadrock55 » 28 Dec 2013

200 tick bars.

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Multiple Time Frame Signal Strategy

Postby TJ » 28 Dec 2013

I have an odd issue. I am using three data series.
::
Is this a known issue? Is there something I can do to correct it?
...sorry... can't tell more without the code.

shadrock55
Posts: 51
Joined: 24 Feb 2011
Location: Atlanta, GA
Has thanked: 5 times
Been thanked: 8 times

Re: Multiple Time Frame Signal Strategy

Postby shadrock55 » 29 Dec 2013

I have a lot (and I mean a lot) of code. Here is a picture and a snippet of the code.

Captioned Bar 1 (in Data1): The conditions are false

Captioned Bar 2 (in Data2): The conditions are now true, and a buy stop is issued above the high of this bar.

Captioned Bar 3 (in Data3): The conditions continue to be true and the buy stop remains in place.

Caption Bar 4: (in Data1): The conditions are true and the trade hit the "High plus One Tick" entry trigger, but the trade does not trigger.

The code itself in unremarkable.

Code: Select all


If Condition1 and Condition2 and Condition3 Then Begin
Entry_L = High of Data2 + Minmove/PriceScale;
End;

Buy("L") next bar Entry_L Stop;
Attachments
Example.png
(143.79 KiB) Downloaded 1049 times

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Multiple Time Frame Signal Strategy

Postby TJ » 29 Dec 2013

Signals are calculated at the end of the bar,
unless you have enabled IOG.

shadrock55
Posts: 51
Joined: 24 Feb 2011
Location: Atlanta, GA
Has thanked: 5 times
Been thanked: 8 times

Re: Multiple Time Frame Signal Strategy

Postby shadrock55 » 29 Dec 2013

I don't fully understand the response.

Are you saying that after the first labeled bar ends on Data 1, it does not matter that the state changes in Data 2 or Data 3 because the next bar has already begun in Data 1?

If I issue a command to "buy next bar" Multicharts will assume it is the bar after what I have labeled as the next bar in Data 1 because Multicharts perceives that bar as already begun?

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Multiple Time Frame Signal Strategy

Postby TJ » 29 Dec 2013

I don't fully understand the response.
Are you saying that after the first labeled bar ends on Data 1, it does not matter that the state changes in Data 2 or Data 3 because the next bar has already begun in Data 1?
If I issue a command to "buy next bar" Multicharts will assume it is the bar after what I have labeled as the next bar in Data 1 because Multicharts perceives that bar as already begun?
I don't know what you mean by "first labeled bar ends on Data 1".

Signals are always calculated based on data1 timing.
Signals are calculated at the end of the bar.
ie. Signal calculation begins when the data1 bar has completed, not before that, not in between.
ie. NOT intrabar.
(unless IOG is enabled)

At the end of the data1 bar,
MultiCharts will gather the values of all the variables
and performs the calculation of your logic.
If an order is triggered, it will be sent at the next tick.


Return to “MultiCharts”