Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 604 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bug in ldow() ? #459691
05/31/16 12:49
05/31/16 12:49
Joined: Apr 2016
Posts: 5
W
wingt Offline OP
Newbie
wingt  Offline OP
Newbie
W

Joined: Apr 2016
Posts: 5
It looks like ldow() function doesn't perform properly. It always returns same result as dow().

Zorro version 1.44
Here my code:

function run()
{
set(PLOTNOW);
PlotScale = 8;
PlotWidth = 2000;
ColorEquity=0;
ColorDD=0;
BarPeriod=60;
LookBack=200;
StartDate=20150805;
EndDate=20150807;
PlotDate=20150805;
asset("EURUSD");
vars L =series(priceLow());
vars H=series(priceHigh());
vars L1 =series(L[0]-0.0005);
vars H1=series(H[0]+0.0005);

if (ltod(ET)>=0 && ltod(ET)<1200) plot("loc",H,DOT,RED);
if (tod()>=0 && tod()<1200) plot("utc",L,DOT,GREEN);
// comment 2 rows above and uncomment 2 rows below to get second image
//if (ldow(ET)==4) plot("locW",H1,DOT,RED);
//if (dow(0)==4) plot("utcW",L1,DOT,GREEN);

}

There is difference in 4 hours between local time (ET) and UTC as it's shown in fig. 1.
Obviously, that for UTC a new day of week also has to start on 4 hours (bars) before local time.
However, as it can be seen in fig. 2 it isn't the case.
Maybe I'm doing something wrong?

Attached Files
Fig_1.png (5 downloads)
Fig_2.png (2 downloads)
Re: Bug in ldow() ? [Re: wingt] #459693
05/31/16 14:31
05/31/16 14:31
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
You're right, there seems to be something wrong with ldow(). We'll check and fix that for the next update.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1