and i have this backtest which it call it but it does not work ….
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
aa= 4 bb=aa*2 REM Achat ignored, ignored, ignored, ignored, ignored, indic1, indic2= CALL "premier stochastic2" c1 = (indic1 > -0.1) IF c1 and not onmarket THEN BUY 1 contract AT MARKET pr=tradeprice(1) tg=pr*(1+bb) st=pr*(1-aa) ENDIF sell at st stop sell at tg limit REM Vente à découvert c2 = (indic2 < 0.1) IF c2 and not onmarket THEN SELLSHORT 1 contract AT MARKET prv=tradeprice(1) tgv=prv*(1-bb) stv=prv*(1+aa) ENDIF exitshort at stv stop exitshort at tgv limit |