Using "Cross Over" with "Time"  [SOLVED]

Questions about MultiCharts and user contributed studies.
wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Using "Cross Over" with "Time"

Postby wilkinsw » 20 Oct 2014

Code: Select all

inputs:t1(100),t2(200);

if time crosses over t1 then
value1=1 else value1=0;

if time crosses over t2 then
value2=1 else value2=0;

plot1(value1);

plot2(value2);
The above code does not generate expected behaviour. Sometimes Values1/2 will flag the cross over of input times and other times not.

The following code seems to correctly flag everytime input time is crossed over:

Code: Select all

inputs:t1(100);

if time crosses over t1 then
value1=1 else value1=0;

plot1(value1);
So it seems like flagging two seperate time cross overs in the same indicator doesn't function as expected.

Why is this?

Many thanks.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Using "Cross Over" with "Time"

Postby Henry MultiСharts » 20 Oct 2014

Hello wilkinsw,

Please make sure there are bars closing at 1:00 and 2:00 respectively on your chart.

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: Using "Cross Over" with "Time"

Postby wilkinsw » 20 Oct 2014

I have Henry.

This behaviour also takes place in TS. I've only just discovered it but don't understand why it happens.

Copy and paste my code above and you'll see what I'm talking about (hopefully).

(plot a eurofx 60min chart and use 0200 and 0500 as the inputs..... you'll see that, in this example, that only the 0200 cross overs get flagged)

The fact I don't understand why using the term "cross over" with time generates unexpected behaviour means that there is something rather significant that I don't and need to understand.

What makes it even stranger is that the code placed in a strategy (vs an indicator) seems to work fine.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Using "Cross Over" with "Time"

Postby Henry MultiСharts » 21 Oct 2014

We were unable to replicate this behavior on our end. Please send us (support@multicharts.com) the following information for further analysis:
- workspace you are using;
- in QuoteManager select the symbol you are using, make a right click on it->Export data->Export instrument (with data). Send us the QMD export file;
- in PowerLanguage editor->File->Export->Export with dependent functions the study you are using for replicating this behavior; send us the pla file;
- specify the version and build number of MultiCharts you are running (in MultiCharts go to Help tab-> About);
- attach full-sized screenshots demonstrating the error.

If the file size is >10 mb please upload it to any file sharing hosting and send me the download link.

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: Using "Cross Over" with "Time"

Postby wilkinsw » 21 Oct 2014

I sent you all the requested info.

I've just repeated the tests I sent you on an MC9 demo I have. The behaviour is as expected in MC9 from what I can see.

So it seems to be only an issue with pre MC9 versions.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Using "Cross Over" with "Time"  [SOLVED]

Postby Henry MultiСharts » 30 Oct 2014

We have verified that the issue is fixed in MultiCharts 9.0 Release.


Return to “MultiCharts”