Reset vars

Posted By: tradingest

Reset vars - 10/13/18 16:01

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
Posted By: Smon

Re: Reset vars - 10/16/18 17:08

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!
Posted By: tradingest

Re: Reset vars - 10/16/18 22:40

thanks so much
© 2024 lite-C Forums