A AMELIORER NOUVELLE STRATEGIE CAC40 1MIN SUR 10 000 UNITES
Forums › ProRealTime forum Français › Support ProOrder › A AMELIORER NOUVELLE STRATEGIE CAC40 1MIN SUR 10 000 UNITES
- This topic has 2 replies, 2 voices, and was last updated 4 years ago by Scooby.
-
-
07/10/2020 at 2:27 PM #138874
Bonjour,
Voici ma nouvelle stratégie pour le CAC40 (FRANCE40 chez IG) sur 1 minute et étudiée sur 10 000 bougies car je ne souhaite pas intégrer la période du COVID car la volatilité était forte. Je pense qu’il faut réactuliser les variables gains et stoploss tous les 10 000 bougies. Mon but est de faire beaucoup de trades avec des gains raisonnables et des pertes raisonnables. J’ai utilisé la supertrend intégrée à prorealtime en multiframe, peut-être faudrait-il la remplacer par la formule de calcul de l’angle et de la pente ?? Si il y a des passionnés de programmation qui peuvent améliorer ma stratégie, ce serait sympa. Je suis dispo pour toute question.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184REM PARAMETRESdefparam cumulateorders=false//defparam flatbefore=082900defparam preloadbars=10000Defparam flatafter=215900timeframe(1 minute)n=3IF time<083000 or time>211000 thenjournee=0elsejournee=1endifREM GAINSgain=highest[32]-lowest[27]gain2=highest[1]-lowest[1]IF time>163000 or time<070000 thengain2=10gain=15endifREM PERTESif time>163000 OR TIME<083000 thenset stop loss 20elseset stop loss 36endifREM TENDANCES EN 12 MINUTES CROISEE AVEC 1 MINUTEtimeframe (12 minute)if Supertrend[2,1]<close or supertrend[4,1]>close or close[100]<close[53] thenmont2=1elsemont2=0endifif shortonmarket and (tradeprice-close)<0 thenmont2=0endifif Supertrend[1,1]>close or supertrend[2,1]>close or close[15]>close thendesc2=1elsedesc2=0endiftimeframe (1 minute)if Supertrend[4,7]<close or supertrend[19,2]<close or ((close[120]-close)>80) thenmont=1elsemont=0endifif shortonmarket and (tradeprice-close)<0 thenmont=0endifif Supertrend[19,2]>close or supertrend[16,3]>close or ((close-close[380])>145) thendesc=1elsedesc=0endifREM STOCHASTIQUE TIME SERIESp=20q=2plusHaut = HIGHEST[p](HIGH)plusBas = LOWEST[p](LOW)oscillateur = (CLOSE - plusBas) / (plusHaut - plusBas) * 100K = AVERAGE[q,6](oscillateur)REM CALCUL NB BOUGIES MEME COULEURu=9w=8descente=0for z=1 to u doif open[z]>close[z] thendescente=descente+1endifnextif descente>=w thenstopvente=0elsestopvente=1endift=11v=10montee=0for y=1 to T doif open[y]<close[y] thenmontee=montee+1endifnextif montee>=V thenstopachat=0elsestopachat=1endifREM CALCUL DE LA CLOTUREecartclot=(time+63000)/166.66cloturehier=close[ecartclot]rem INTERDICTIONS MATHEMATIQUESIF K[1]<-10 or stopvente=0 or (close[720]-close)>60 or (close[85]-close)>28 or (Average[15](close)-close[2]>8) or close<(dopen(0)-69) or close<(cloturehier-36) thenstopv=1elsestopv=0endifif (close-lowest[40])>80 OR K[1]>95 or stopachat=0 OR (close-close[720])>168 or (close-close[77])>52 or (close[3]-Average[18](close)>6) or close>(dlow(0)+80) or close>(cloturehier+81) thenstopa=1elsestopa=0endifREM INTERDICTIONS TEMPORELLESif (time>073000 and time<082000) or (time>112000 and time<123000) or (time>150000 and time<153000) or (time>162500 and time<180000) thenstoptimea=1elsestoptimea=0endifif (time>100000 and time<110000) or (time>121500 and time<131500) or (time>153000 and time<163000) or (time>083500 and time<091500) or (dayofweek=1 and time<120000) OR TIME<083000 OR time>200000 thenstoptimev=1elsestoptimev=0endifREM ACHATIF open[2]<close[2] and mont=1 and mont2=1 and JOURNEE=1 and stopa=0 and stoptimea=0 and acha=1 thenbuy n share at marketset target profit gainlastorder=0endifREM VENTEif not onmarket and open[2]>close[2] and open[1]>close[1] and desc=1 and journee=1 and vent=1 and desc2=1 and stopv=0 and stoptimev=0 thensellshort n share at marketset target profit gain2lastorder=1endifREM CLOTURE SI CHANGEMENT DE TENDANCEif longonmarket and desc=1 and journee=1 and stopv=0 and stoptimev=0 and vent=1 and desc2=1 and (barindex-tradeindex)>1 and (close-tradeprice)>0 thensell at marketlastorder=1endifif shortonmarket and mont=1 and mont2=1 and stopa=0 and journee=1 and stoptimea=0 and acha=1 and (barindex-tradeindex)>1 and (tradeprice-close)>0 thenexitshort at marketlastorder=0endifif mont=1 and mont2=1 and journee=1 and stopa=0 and shortonmarket and (tradeprice-close)>1 thenexitshort at marketlastorder=0endifif desc=1 and desc2=1 and longonmarket and (close-tradeprice)>1 thensell at marketendifREM CLOTURE POUR GAIN RAPIDEif longonmarket and (barindex-tradeindex)<3 and (close-tradeprice)>8 thensell at marketendifif shortonmarket and (barindex-tradeindex)<3 and (tradeprice-close)>8 thenexitshort at marketendifIF longonmarket and (barindex-tradeindex)>146 and (close-tradeprice)>0 thensell at marketendifif shortonmarket and (barindex-tradeindex)>80 and (tradeprice-close)>0 thenexitshort at marketendifREM INTERDICTION DU MEME ORDRE SI TROP ELOIGNEif (close-tradeprice)>34 and lastorder=0 thenacha=0elseacha=1endifif (tradeprice-close)>7 and lastorder=1 thenvent=0elsevent=1endifREM CLOTURE ANTICIPEEif longonmarket and (close-tradeprice)>6 and (barindex-tradeindex)<4 thensell at marketendifif shortonmarket and (tradeprice-close)>4 and (barindex-tradeindex)<=1 thenexitshort at marketendifif shortonmarket and (tradeprice-close)>13 and (barindex-tradeindex)>46 thenexitshort at marketendifif longonmarket and (close-tradeprice)>1 and (barindex-tradeindex)>138 thensell at marketendifif longonmarket and (close-tradeprice)>-1 and (barindex-tradeindex)>92 thensell at marketendifif shortonmarket and (tradeprice-close)>-5 and (barindex-tradeindex)>80 thenexitshort at marketendif07/10/2020 at 5:34 PM #138968Je précise que le résultat obtenu est avec :
-1- un créneau horaire d’Angleterre à H+1 (actuellement H+2 en France), donc 16h30 dans mon code veut dire 17h30 en France
Il faut donc soit que vous rajoutiez 1 heure au code soit que vous mettiez votre plateforme en heure britannique
-2- 1000€ de capital suffisent car je ne joue que 3 mini contrats ne demandant que 750 € de couverture environ
Ci-joint performance du jour au 10/07/2020 avec 1000 € de capital en début de backtest
07/11/2020 at 12:05 PM #138999Il est possible d’ajouter des filtres de volatilité pour éviter les trades durant une période comme celle du corona.
Tu pourras avoir une stratégie testable sur une horizon plus longue et plus représentatives du marché.
Surtout qu’en ce moment les marchés sont encore bien différent de la période pérenne de fin 2019/début 2020.
-
AuthorPosts