Bonjour Nicolas,
Je te sollicite afin de savoir quelles améliorations je peux apporter à cet algorithme de scalping sur le Dow Jones en 2min UTC+1 Spread 1.6
Sur les performances passées il est trés bien mais dés qu’on le met en route c’est un peu catastrophique
Je fais appel à ton expérience, il y a certainement des voies que je n’ai pas exploré pour le rendre + fiable
Aussi, si toute personne a des idées, elles sont les bienvenues.
D’avance merci.
REM WALL STREET DOW JONES 2 MIN HEURE ANGLAISE UTC+1 SPREAD 1.6
REM RAJOUTER 1 HEURE PARTOUT SI VOUS ETES CONFIGURE EN UTC+2
defparam cumulateorders=false
defparam flatbefore=142900
defparam preloadbars=2000
defparam flatafter=205700
set target profit 13
SET STOP LOSS 66
n=1
xx=72
xx2=43
yy=19
yy2=52
Ja=5
jv=3
xa=3
xv=0
if longonmarket and (close-tradeprice)>0 and (barindex-tradeindex)>1 and close-close[5]>4 and gov=1 and gov2=1 then
sellshort n shares at market
endif
if shortonmarket and (tradeprice-close)>1 and (barindex-tradeindex)>0 and close[7]-close<0 and goa2=1 and goa=1 and k<62 then
buy n shares at market
endif
if not onmarket and close[6]-close<16 and goa2=1 and goa=1 and k<xx2 and high[13]>high[7] and k<43 then
buy n shares at market
endif
if not onmarket and close-close[7]>9 and gov=1 and gov2=1 and k>yy2 and low[9]<low[6] then
sellshort n shares at market
endif
if shortonmarket and (tradeprice-close)>10 and close[22]-close[8]<20 then
exitshort at market
endif
if longonmarket and (close-tradeprice)>9 and (barindex-tradeindex)<1 then
sellshort n shares at market
endif
REM 5619 5522
if close>27285 then
goa2=0
else
goa2=1
endif
if close<25579 then
gov2=0
else
gov2=1
endif
rem 3 et 10 moins de perte mais plus mou
if close[6]-close>27 then
goa=0
else
goa=1
endif
if close-close[11]>85 then
gov=0
else
gov=1
endif
REM STOCHASTIQUE TIME SERIES
p=15
q=2
plusHaut = HIGHEST[p](HIGH)
plusBas = LOWEST[p](LOW)
oscillateur = (CLOSE - plusBas) / (plusHaut - plusBas) * 100
K = AVERAGE[q,6](oscillateur)
p2=4
q2=7
plusHaut2 = HIGHEST[p2](HIGH)
plusBas2 = LOWEST[p2](LOW)
oscillateur2=(CLOSE - plusBas2) / (plusHaut2 - plusBas2) * 100
K2 = AVERAGE[q2,6](oscillateur2)
periode=1
innere = 2*weightedaverage[ round( Periode/2 ) ](close)-weightedaverage[Periode](close)
MM=weightedaverage[round(sqrt(periode))](innere)
periode2=3
innere2 = 2*weightedaverage[ round( Periode2/2 ) ](close)-weightedaverage[Periode2](close)
MM2=weightedaverage[round(sqrt(periode2))](innere2)
// ouvrir position acheteuse
if k<xx and mm[19]>mm[29] and high[14]<high and goa=1 and goa2=1 then
buy n shares at market
endif
// ouvrir position vendeuse
if longonmarket and (close-tradeprice)>2 and k2>yy and low>low[2] and mm2>mm2[16] and gov=1 and gov2=1 then
sellshort n shares at market
endif
if not onmarket and k2>yy and low[7]>low[4] and mm2[16]>mm2[15] and gov=1 and gov2=1 then
sellshort n shares at market
endif
if longonmarket and (BarIndex-TRADEINDEX)>ja and gov2=1 then
sellshort n shares at market
endif
if shortonmarket and (BarIndex-TRADEINDEX)>jv and goa2=1 then
buy n shares at market
endif
if longonmarket and (BarIndex-TRADEINDEX)>xa and gov=1 and gov2=1 and (close-tradeprice)>4 then
sellshort n shares at market
endif
if shortonmarket and (BarIndex-TRADEINDEX)>xv and goa=1 and goa2=1 and (tradeprice-close)>11 then
buy n shares at market
endif
Sur-optimisation. Ah ! Si je connaissais les chiffres du Loto à l’avance ! et c’est bien ce que tu as fait en développant ton algorithme de trading. Il faut toujours diviser ses périodes de test (méthode IS+OOS), pour valider la robustesse de la stratégie. On peut utiliser le module de Walk Forward pour cela, voir les vidéos dans ces articles :
https://www.prorealcode.com/blog/video-tutorials/analyse-walk-forward-prorealtime/
https://www.prorealcode.com/blog/video-tutorials/recapitulatif-sur-lutilisation-du-module-walk-sous-prorealtime/
et ce sujet où on en discute : https://www.prorealcode.com/topic/optimisation-et-analyse-walk-forward-_-aides/
Il y bien d’autres sujets à ce propos également dans le forum anglophone.
Par ailleurs la version 11 intègre également maintenant un outil pour visualiser ses variables optimisés sur 3 axes (vues 3D).
Bonjour Nicolas,
Merci pour tes réponses.
Aussi, je suis sur prorealtime 10.3 en CFD avec IG, la version 11 est elle disponible ou faut-il attendre un déploiement automatique de mise à jour ?
La version 11 pour les clients IG ou PRT Sponsored devrait être déployé dans le courant du mois de Septembre (sous réserve).