IntrabarOrderGeneration/BarStatus

Questions about MultiCharts and user contributed studies.
simon007
Posts: 60
Joined: 12 Apr 2007
Has thanked: 7 times
Been thanked: 1 time

IntrabarOrderGeneration/BarStatus

Postby simon007 » 07 Feb 2014

Hi @,

When I run the strategy below with data1/5 minute interval and data2/15 minute interval> I expect to see the first print command every 5 minutes and the second print command every 15 minutes


Code: Select all

[IntrabarOrderGeneration = True];
{==============================================================================================}
If BarStatus(1)=2 then
Print(FormatDate("dd-MM-yyyy", ELDateToDateTime(Date))+" "+FormatTime("HH:mm:ss", ELTimeToDateTime(Time))+" Data1 ");

If BarStatus(2)=2 then
Print(FormatDate("dd-MM-yyyy", ELDateToDateTime(Date))+" "+FormatTime("HH:mm:ss", ELTimeToDateTime(Time))+" Data2 ");
{==============================================================================================}
but the output looks like this..

Code: Select all

02-02-2014 18:10:00 Data1
02-02-2014 18:15:00 Data2
02-02-2014 18:15:00 Data2
02-02-2014 18:15:00 Data2
02-02-2014 18:15:00 Data1
02-02-2014 18:15:00 Data2
02-02-2014 18:20:00 Data1
02-02-2014 18:25:00 Data1
02-02-2014 18:30:00 Data2
02-02-2014 18:30:00 Data2
02-02-2014 18:30:00 Data2
02-02-2014 18:30:00 Data1
02-02-2014 18:30:00 Data2
02-02-2014 18:35:00 Data1
02-02-2014 18:40:00 Data1
02-02-2014 18:45:00 Data2
02-02-2014 18:45:00 Data2
02-02-2014 18:45:00 Data2
02-02-2014 18:45:00 Data1
02-02-2014 18:45:00 Data2
02-02-2014 18:50:00 Data1
02-02-2014 18:55:00 Data1
02-02-2014 19:00:00 Data2
02-02-2014 19:00:00 Data2
02-02-2014 19:00:00 Data2
02-02-2014 19:00:00 Data1
02-02-2014 19:00:00 Data2
02-02-2014 19:05:00 Data1
02-02-2014 19:10:00 Data1
02-02-2014 19:15:00 Data2
Why doe I see the second print command 3 times instead of 1?

Cheers,

Simon

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: IntrabarOrderGeneration/BarStatus

Postby JoshM » 07 Feb 2014

Why doe I see the second print command 3 times instead of 1?
Have you checked the Real-time History Matching setting? I *suppose* that might play a role here.

simon007
Posts: 60
Joined: 12 Apr 2007
Has thanked: 7 times
Been thanked: 1 time

Re: IntrabarOrderGeneration/BarStatus

Postby simon007 » 07 Feb 2014

Why doe I see the second print command 3 times instead of 1?
Have you checked the Real-time History Matching setting? I *suppose* that might play a role here.
Hi Josh,

I just tried it, but it doesn't solve it.

When I use the following it works...

Code: Select all

[IntrabarOrderGeneration = True];
{==============================================================================================}
If BarStatus(1)=2 then
Print(FormatDate("dd-MM-yyyy", ELDateToDateTime(Date))+" "+FormatTime("HH:mm:ss", ELTimeToDateTime(Time))+" Data1 ");

If BarStatus(1)=2 and BarStatus(2)=2 then
Print(FormatDate("dd-MM-yyyy", ELDateToDateTime(Date))+" "+FormatTime("HH:mm:ss", ELTimeToDateTime(Time))+" Data2 ");
{==============================================================================================}


Return to “MultiCharts”