Change in dayofweek code?

Questions about MultiCharts and user contributed studies.
yonobarn
Posts: 8
Joined: 23 Apr 2011
Has thanked: 4 times

Change in dayofweek code?

Postby yonobarn » 09 Sep 2013

Hi,

I recently updated to build 7633.

Previously, to define the trading day of the week (TDOW), I used this code:

if dayofweek(date of next bar) < dayofweek(date) then TDOW=1 else TDOW=TDOW+1;

Since the update, it no longer works properly, and instead (strangely) the exact opposite code gives me the answer I need:

if dayofweek(date of next bar) > dayofweek(date) then TDOW=1 else TDOW=TDOW+1;

Any ideas as to what has happened here?

yonobarn
Posts: 8
Joined: 23 Apr 2011
Has thanked: 4 times

Re: Change in dayofweek code?

Postby yonobarn » 09 Sep 2013

Scratch that, looks like the new code will be:

if dayofweek(date) < dayofweek(date of 1 bar ago) then TDOW=1 else TDOW=TDOW+1;

Again, I am interested to know how/why this changes. A similar thing happened last update, with different code...

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

Re: Change in dayofweek code?

Postby Henry MultiСharts » 19 Sep 2013

Hello yonobarn,

There was an issue with "Date Next Bar" construction. It has been already resolved. The fix will become available in MultiCharts 8.8 Beta 1.


Return to “MultiCharts”