In Test, adviseLong sometimes returns 0 without calling neural

Posted By: GPEngine

In Test, adviseLong sometimes returns 0 without calling neural - 07/06/15 16:45

I have a strategy with RULES and adviseLong(NEURAL,...)

In my neural function, when mode == NEURAL_PREDICT, the only possible return values are 1, -1, and 0.00001.

Nevertheless, in Test mode, the return value of adviseLong is sometimes 0. So, adviseLong sometimes returns without calling neural(mode=NEURAL_PREDICT,...). What is it doing instead?

I added a print statement to the top of neural() and found it is not called at all in these cases. Why does adviseLong sometimes not bother to call neural() and just return arbitrary zero?

From the manual:
Quote:
NEURAL_PREDICT model, numSignals, Data Return the value predicted by the model using the signals contained in the Data double array. The function is called by an advise call in [Test] and [Trade] mode.
Posted By: jcl

Re: In Test, adviseLong sometimes returns 0 without calling neural - 07/07/15 07:11

It returns zero when trading is disabled. F.i. in the lookback period, at weekend, and in the inactive bars of a time frame.
Posted By: GPEngine

Re: In Test, adviseLong sometimes returns 0 without calling neural - 07/07/15 13:18

Thanks.
© 2024 lite-C Forums