Originally Posted By: jcl
Yes. You can use 0 or 1 for the Objective, but according to the manual not both at the same time:

"All advise calls for a given asset/algo combination must use the same Method, the same signals, and the same training target type (either Objective or trade result)."



Sorry I am still confused about what you wrote, because in another part of the manual you wrote:

Quote:

When using a future value for prediction, such as the price change of the next bars (f.i. Objective = priceClose(-5) - priceClose(0)), make sure to set the PEEK flag in train mode. Alternatively, use the price change of a past bar to the current bar, and pass past signals - f.i. from a series - to the advise function in train mode, f.i.:
Objective = priceClose(0) - priceClose(5);
int Offset = ifelse(Train,5,0);
var Prediction = adviseLong(Method,Objective,Signal0[Offset],Signal1[Offset],...);


In this case, the Object variable has range of values.
So, my aim is to train a model against the ZigZag target and predict values of this target.
What about this snippet, what is wrong?

Code:
vars PriceMed = series((priceHigh()+priceLow())/2);
ZigZag(PriceMed, 0.0037, 16, 1);
adviseLong(SIGNALS+BALANCED, rSign, ADX(16));