if (i==0) Seria[i]=1;
if(i > 0) {
if (sign(pl)*sign(plPrev)<0) {
Seria[i]=Seria[i-1]+1;
} else {
Seria[i]=Seria[i-1];
}
} else {
Seria[i] = 0;
}
When going through the order loop, for the very first order Seria[0]=1 and then straight after Seria[0]=0. Note, the yellow block is not getting run until 2nd order, so it doesn't make sense to have 1 and 0 straight after without much use.. What should the correct assignment be? I hope its not impacting accuracy of ZScore.
Also, the ZScore is not handling non-filling trades, e.g. limit/stop/cancelled/deposits/withdrawals etc. properly. It is treating them as Profitable trades, whereas they are not. Can you look into this properly?
Also, ZProbability should be be around 99.67% for ZScore=3 or ZScore=-3 and approaches 0% as ZScore gets closer to 0. The values do not seem to reflect like that. Though I have not tested ZProbability thoroughly, so not 100% sure.
Status changed from New to Fixed