Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, 7th_zorro, VoroneTZ, Quad), 901 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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