Is it possible to use separate calls to adviseLong(NEURAL...) and adviseShort(NEURAL...) in order to train different machine learning models on different user-defined market regimes? For example, train one model for an uptrending market and a different model for a downtrending market.
For example, I could do this:
if (rising(filter)) {
var Predict = adviseLong(NEURAL,
Objective, Signal1, Signal2);
if (Predict > 0) enterLong();
else if (Predict < 0) enterShort();
}
else if (falling(filter)) {
var Predict = adviseShort(NEURAL,
if (Predict > 0) enterLong();
else if (Predict < 0) enterShort();
}
However, this obviously won't produce the intended result since models are saved and loaded by the NEURAL function according to asset, algo and loop calls, rather than according to changes to the regime detection indicator.
How much flexibility does the user have over the NEURAL function? Could it be modified to achieve this idea? If so, can you suggest an approach?
Thanks!