Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by 3run. 09/19/19 09:42
Any chance of PBR materials with A8?
by Quad. 09/18/19 18:00
Sierra Chart Plugin
by AndrewAMD. 09/18/19 14:03
3d model editor
by karmacomposer. 09/18/19 13:18
Can MED export to FBX?
by karmacomposer. 09/18/19 13:07
I cannot get the A8 game engine to show anything
by karmacomposer. 09/18/19 12:38
Script, Start Trading Immediately
by jcl. 09/18/19 08:38
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
12 registered members (Ayumi, 3run, AndrewAMD, Quad, saulius, 20BN, kvm, MatPed, 3 invisible), 613 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Dark_Light, oxygenjoe, web20tpo, tarekhazem, Juanjo
18290 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Return current bar in Unix time #477143
05/24/19 05:32
05/24/19 05:32
Joined: Nov 2018
Posts: 48
G
gamadeus Offline OP
Newbie
gamadeus  Offline OP
Newbie
G

Joined: Nov 2018
Posts: 48
Hello,

I am struggling to get Zorro to return the current bar in Unix time.
Apparently that can be done via utm() but I have trouble finding the correct var Date to feed.

Can someone help me with that?

Re: Return current bar in Unix time [Re: gamadeus] #477146
05/24/19 11:04
05/24/19 11:04
Joined: Jul 2000
Posts: 27,006
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,006
Frankfurt
utm(wdate(0))

Re: Return current bar in Unix time [Re: jcl] #477199
05/30/19 11:15
05/30/19 11:15
Joined: Nov 2018
Posts: 48
G
gamadeus Offline OP
Newbie
gamadeus  Offline OP
Newbie
G

Joined: Nov 2018
Posts: 48
Thanks Jcl!

One problem though I have with this is that when I run this in Trademode under FRISTRUN it will not give me the current bar and timestamp but the first Lookback bar.

Is there any way to just get the current timestamp in that format without any bar offset required?

And a related question: is there a flag similar to FIRSTRUN that is triggered on the first bar after the Lookback period?

Re: Return current bar in Unix time [Re: gamadeus] #477200
05/30/19 14:04
05/30/19 14:04
Joined: Jul 2017
Posts: 400
Z
Zheka Offline
Senior Member
Zheka  Offline
Senior Member
Z

Joined: Jul 2017
Posts: 400

if (!is(LOOKBACK))
{
}

Re: Return current bar in Unix time [Re: Zheka] #477201
05/30/19 14:23
05/30/19 14:23
Joined: Nov 2018
Posts: 48
G
gamadeus Offline OP
Newbie
gamadeus  Offline OP
Newbie
G

Joined: Nov 2018
Posts: 48
yes thanks of course I am aware of that.
but I want to know if there is a flag similar to INITRUN for Lookback, because !is(LOOKBACK) is true for every run after the lookback period

Re: Return current bar in Unix time [Re: gamadeus] #477204
05/30/19 16:09
05/30/19 16:09
Joined: Feb 2017
Posts: 754
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 754
Chicago

Re: Return current bar in Unix time [Re: AndrewAMD] #477205
05/30/19 16:24
05/30/19 16:24
Joined: Nov 2018
Posts: 48
G
gamadeus Offline OP
Newbie
gamadeus  Offline OP
Newbie
G

Joined: Nov 2018
Posts: 48
thanks a lot Andrew, should have realized that myself!


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