Hi Spirit and thanks for your answer, can we discuss it?
If you have Workshop7 in mind I would agree with you. Fixed patterns are searched first (Step 1) and in Step 2 the best matching parameters to catch the learned patterns. A subsequent change of the parameters does NOT change the patterns found here.
In NEURAL training the "next Trade Return / Result" or custom objectives that looks different (to me). Maybe I'm wrong but I think it does not make sense to train an ML model first on certain rules - if you then change these rules after training again. I'll post some code parts, let's see what you (or others) think about this approach.
PEEK is used and DataHorizon = 30...
while(asset(loop(ASSETS)))
while(algo(loop(ALGOS))) {
TakeProfit = optimize(1,1,4,1) * ATR(100);
Stop = TakeProfit / 2.0;
vars dat = series(price());
vars rsi = series(RSI(dat,5));
int pos = 0; // future bar pos
var fhv = priceHigh(0); // future highest high value
var flv = priceLow(0); // future lowest low value
var obL = -1.0; // custom objective long, never 0
var obS = -1.0; // custom objective short, never 0
if(Train && !is(LOOKBACK)) {
for(pos=1; pos <= DataHorizon; pos++) {
fhv = max(fhv,priceHigh(-pos));
flv = min(flv,priceLow(-pos));
}
if(valley(rsi) && flv > (priceClose(0) - Stop) && fhv > (priceClose(0) + TakeProfit)) obL=1.0;
if(peak(rsi) && fhv < (priceClose(0) + Stop) && flv < (priceClose(0) - TakeProfit)) obS=1.0;
}
var avL = adviseLong(NEURAL+BALANCED,obL,INP,12);
var avS = adviseShort(NEURAL+BALANCED,obS,INP,12);
}
Starting from the current position (Bar) I'm scanning the next 30 bars for it's lowest and highest values. After that i create a custom objective, if price starts from valley/peak and hits the Takeprofit but not the Stoploss, take this trade / objective = 1 else -1.
Question 1: Changing the TP/SL after i have trained the model with a custom objective makes no sense here?Question 2: If you use Objective = 0, you will train your model for
every positive trade. These often
win only by chance, not because a rule is behind these entry's. I have never achieved meaningful results with this method (open a trade on every bar + learning all positive trade returns). What should an ML model
generalize here?