Not clear about LifeTime for machine learning training

Posted By: zzy

Not clear about LifeTime for machine learning training - 10/08/20 09:44

Dear Developers,

On this page: https://manual.zorro-project.com/tutorial_pre.htm, I read the following:

"LifeTime sets the duration of a trade to 3 bars, assuming that a 3 bars candle is good for a 3 bars prediction. If a trade is not closed by an opposite pattern, it is closed after a week. The trade results after one week are also used for training the candle patterns and generating the trade rules. MaxLong/Short limit the number of open trades in test or trade mode to 1."

My question is, why "If a trade is not closed by an opposite pattern, it is closed after a week."? Where does the "a week" come from?
Posted By: danatrader

Re: Not clear about LifeTime for machine learning training - 10/09/20 20:22

BarPeriod = 1440; // 1 day <---------- Defines the size of the candles.
BarMode = BR_LEISURE; // allows weekend bars, but don't trade on them <------------------ From manual: The week then consists of 6 instead of 5 bars.
LifeTime = 3; // = prediction horizon <-------------------- Defines normally the duration of a trade, if no opposite signal appears.



So the strategy sample needs three bars for a pattern, with BR_LEISURE set, the week is 6 bars long, Lifetime is 3, meaning PATTERN + LifeTime = BR_LEISURE WEEK... 3+3 = 6.

So, if pattern occurs, three days of the week are already over, with LifeTime 3, the trade is entered for a max. duartion of 3 days, and after 6 days the week is over.


The sentence is a bit unclear, maybe it would better be:

If a trade is not closed by an opposite pattern, it is closed 3 bars after entering, counting weekends as one bar.
Posted By: zzy

Re: Not clear about LifeTime for machine learning training - 10/11/20 08:49

Thanks danatrader for the answer, which I think is reasonable.
© 2024 lite-C Forums