The strange thing is, jcl does it in the same way as i did in #3, his script runs fine...?
babypips_jcl_LS.c
if(strstr(Algo,":L") and valley(Trend)) enterLong(); else
if(strstr(Algo,":S") and peak(Trend)) enterShort();
parameter_test_3
if(strstr(Algo,":L") && valley(sig)) enterLong(); else
if(strstr(Algo,":S") && peak(sig)) enterShort();
EDIT:I think I found a possible explanation (maybe)?
Hedge
0 = no hedging; automatically close opposite positions with the same asset when a new position is opened (default for NFA accounts).
1 = hedging across algos; automatically close opposite positions with the same algo when a new position is opened (default for unspecified accounts).
2 = full hedging; long and short positions can be open at the same time.
From test_1 to test_3 I'm in Hedge = 1 (default for me).
But in test_3 I'm limiting enterLong() + enterShort() to :L or :S
if(strstr(Algo,":L") && valley(sig)) enterLong(); else
if(strstr(Algo,":S") && peak(sig)) enterShort();
Because of that:while(algo(loop("TRND:L","TRND:S")))
Does Zorro now handle TRND:L and TRND:S as "the
same" or 2 different Algos?
If so, we never have a enterLong() & (exit short) for TRND:S and never a enterShort() & (exit long) for TRND:L. Result = Open trades are no longer closed?
That would explain why test_4 works correctly, there I have Hedge = 2 and i correctly close the open orders in the respective algo.There is only 1 open question, why does it work in the jcl babypips script, there is no Hedge set, so it is also Hedge = 1...?