Gamestudio Links
Zorro Links
Newest Posts
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 4,606 guests, and 16 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Geir, ondrej, mredit, vestriaa, Lukudo
19206 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: 28,093
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,093
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 | 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