Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,483 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Reset vars #474417
10/13/18 16:01
10/13/18 16:01
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline OP
Member
tradingest  Offline OP
Member

Joined: Feb 2018
Posts: 236
Italy
Hi guys,

I'd like to reset a vars when change the day. I'd like to see maxPL = 0 when change the day.

Here you can find the example

Can you help me? Is it possible to make it?

thanks again

Last edited by tradingest; 10/13/18 16:02.
Re: Reset vars [Re: tradingest] #474454
10/16/18 17:08
10/16/18 17:08
Joined: Dec 2014
Posts: 206
Germany
Smon Offline
Member
Smon  Offline
Member

Joined: Dec 2014
Posts: 206
Germany
The first possibility that comes to my mind is to create a timeseries that stores the wdate() value.

declare the series
vars bla = series(floor(wdate()));

if(bla[1] != bla[0]) maxPL = 0;

Check wdate() and floor() in the manual!

Re: Reset vars [Re: Smon] #474460
10/16/18 22:40
10/16/18 22:40
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline OP
Member
tradingest  Offline OP
Member

Joined: Feb 2018
Posts: 236
Italy
thanks so much


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