Sep 17 2005, 10:08
Post
|
|
|
|
Ok....merci,
Je viens de le copier!Je vais voir ce que ça donne bon week-end! |
Sep 24 2005, 13:12
Post
|
|
|
|
Encore un système foireux qui apparament correst: aucune erreur de syntaxe quand je le passe au vérificateur qui qui ne fonctionne pas.Il ne me réalise que 3 trades de 1996 à mainteant(je backtest sur fxlite en démo).....Pouvez-vous me dire ce qui cloche dans ce code !!!!!!!!Merci
/*[[ Name := 20 days breakouts Author := lev10 Link := http://www.addictfx.biz/5-categorie-90719.html Notes := Système de cassure des plus hauts/plus bas sur 20 jours. Notes := Ce système est backtesté par addictfx sur son site dans la Notes := rubrique backtests (cf lien) pour détails. Lots := 0.10 Stop Loss := 0 Take Profit := 0 Trailing Stop := 0 ]]*/ /* Description succinte du fonctionnement du système tel que décrit sur le site www.addictfx.biz. Time Frame: Daily Studies: 20 Days Highest Highs 20 Days Lowest Lows Setup: Open Long if Close price > 20 Days Highest Highs Open Short if Close price < 20 Days Lowest Lows Trigger: Buy = next open after long setup Short = next open after short setup Stop:No Stop Loss Exit: Exit Long when open new Short and Exit Short when open new Long*/ //Initialisations des varibles Var:buypoint(0); Var:Sellpoint(0); //Calcul des points d'entrée buypoint=High[Highest(MODE_HIGH,21,20)]; sellpoint=Low[Lowest(MODE_LOW,21,20)]; // Condition de marge suffisante If FreeMargin<100 then Exit; //Exclusion de plus d'une position à la fois If Totaltrades<1 then { /*Achat si le prix de clôture est supérieur au plus haut des 20 jours précédents*/ If Close[1]>buypoint then { SetOrder(OP_BUY,Lots,Open,0,0,0,Green);Exit; }; If Close[1]<sellpoint then { SetOrder(OP_SELL,Lots,Open,0,0,0,Red);Exit; }; }; If Totaltrades=1 then{ If OrderValue(1,VAL_TYPE)= OP_BUY then { If Close[1]<sellpoint then { CloseOrder(OrderValue(1,VAL_TICKET),Lots,OrderValue(1,VAL_OPENPRICE),0,Yellow);Exit; }; }; If OrderValue(1,VAL_TYPE)=OP_SELL then { If Close[1]>buypoint then { CloseOrder(OrderValue(1,VAL_TICKET),Lots,OrderValue(1,VAL_OPENPRICE),0,Orange);Exit; }; }; }; |
Sep 24 2005, 17:37
Post
|
|
|
|
et sur le groupe yahoo :
http://finance.groups.yahoo.com/group/Meta...and_Indicators/ |
Oct 11 2005, 18:10
Post
|
|
|
|
Salut,
Voici enfin le premier code non foireux Il s’agit donc d’un système de breakout(Take two Half Profits & Trailing Stop) des plus haut , plus bas de la veille tel que décrit par Addictfx sur son blog www.addictfx.biz Je n’ai fais qu’écrire le code MT3 correspondant au système qu’il décrit dans la partie 5.Donc mieux vaut allez sur le lien pour comprendre le fonctionnement du système.A la différence du système de Addictfx où les ordres sont passés entre 8h et 22h ici les ordres sont passés à minuit. J'ai joint le fichier mql pour ceux qui sont intéressés @+ http://www.addictfx.biz/5-categorie-90719.html *[[ Name := Take two Half Profits & Trailing Stop Breakout System Author := lev10 Link := http://www.addictfx.biz/5-categorie-90719.html Notes := Timeframe daily Lots := 0.10 Stop Loss := 999 Take Profit := 999 Trailing Stop := 999 ]]*/ var:cnt(0); var:trs(0); trs=60*Point; If FreeMargin>100 And TimeToStrEx(CurTime,TIME_MINUTES)<"02:00" And DayOfWeek<6 then { If H[0]<H[1] And L[0]>L[1] then { If Totaltrades=0 then { SetOrder(OP_BUYSTOP,lots,H[1],0,H[1]-30*Point,H[1]+60*Point,green);Exit; }; If Totaltrades=1 then { SetOrder(OP_BUYSTOP,lots,H[1],0,H[1]-30*Point,H[1]+150*Point,GreenYellow);Exit; }; If Totaltrades=2 then { SetOrder(OP_SELLSTOP,lots,L[1],0,L[1]+30*Point,L[1]-60*Point,red);Exit; }; If TotalTrades=3 then { SetOrder(OP_SELLSTOP,lots,L[1],0,L[1]+30*Point,L[1]-150*Point,Orange);Exit; }; }; If H[0]<H[1] And L[0]<L[1]then { If Totaltrades=0 then { SetOrder(OP_BUYSTOP,lots,H[1],0,H[1]-30*Point,H[1]+60*Point,Green);Exit; }; If Totaltrades=1 then { SetOrder(OP_BUYSTOP,lots,H[1],0,H[1]-30*Point,H[1]+150*Point,GreenYellow);Exit; }; }; If H[0]>H[1] And L[0]>L[1]then { If Totaltrades=0 then { SetOrder(OP_SELLSTOP,lots,L[1],0,L[1]+30*Point,L[1]-60*Point,Red);Exit; }; If TotalTrades=1 then { SetOrder(OP_SELLSTOP,lots,L[1],0,L[1]+30*Point,L[1]-150*Point,Orange);Exit; }; }; }; //Instructions OCO// If Totaltrades>2 then { For cnt=1 to 2 Begin If OrderValue(cnt,VAL_TYPE)=OP_BUY then { DeleteOrder(OrderValue(3,VAL_TICKET),red);Exit; DeleteOrder(OrderValue(4,VAL_TICKET),Orange);Exit; }; End; For cnt=3 to 4 Begin If OrderValue(cnt,VAL_TYPE)=OP_SELL then { DeleteOrder(OrderValue(1,VAL_TICKET),Green);Exit; DeleteOrder(OrderValue(2,VAL_TICKET),GreenYellow);Exit; }; End; }; // TrailingStops// If Totaltrades=2 then { For cnt=1 to 2 Begin If OrderValue(cnt,VAL_TYPE)=OP_BUY then { If H[0]-OrderValue(cnt,VAL_OPENPRICE)>=trs then { If H[0]-trs>OrderValue(cnt,VAL_STOPLOSS) then { ModifyOrder(OrderValue(1,VAL_TICKET),OrderValue(1,VAL_OPENPRICE),H[0]-trs,H[1]+60*Point,Green);Exit; ModifyOrder(OrderValue(2,VAL_TICKET),OrderValue(2,VAL_OPENPRICE),H[0]-trs,H[1]+150*Point,GreenYellow);Exit; }; }; }; If OrderValue(cnt,VAL_TYPE)=OP_SELL then { If OrderValue(cnt,VAL_OPENPRICE)-L[0]>=trs then { If L[0]+trs<OrderValue(cnt,VAL_STOPLOSS)then { ModifyOrder(OrderValue(1,VAL_TICKET),OrderValue(1,VAL_OPENPRICE),L[0]+trs,L[1]-60*Point,Red);Exit; ModifyOrder(OrderValue(2,VAL_TICKET),OrderValue(2,VAL_OPENPRICE),L[0]+trs,L[1]-150*Point,Orange);Exit; }; }; }; End; }; For cnt=1 to Totaltrades Begin If OrderValue(cnt,VAL_TYPE)=OP_BUY then { If H[0]-OrderValue(cnt,VAL_OPENPRICE)>=trs then { If H[0]-trs>OrderValue(cnt,VAL_STOPLOSS) then { ModifyOrder(OrderValue(cnt,VAL_TICKET),OrderValue(cnt,VAL_OPENPRICE),H[0]-trs,H[1]+150*Point,GreenYellow);Exit; }; }; }; If OrderValue(cnt,VAL_TYPE)=OP_SELL then { If OrderValue(cnt,VAL_OPENPRICE)-L[0]>=trs then { If L[0]+trs<OrderValue(cnt,VAL_STOPLOSS)then { ModifyOrder(OrderValue(cnt,VAL_TICKET),OrderValue(cnt,VAL_OPENPRICE),L[0]+trs,L[1]-150*Point,Orange);Exit; }; }; }; End; //Clôture des ordres non exécutés en fin de journée //et des trades en cours. If TimeToStrEx(CurTime,TIME_MINUTES)>=("22:45")then Begin //Ordres non exécutés. If Totaltrades>0 then { For cnt=1 to 2 Begin If OrderValue(cnt,VAL_TYPE)=OP_BUYSTOP then { DeleteOrder(OrderValue(1,VAL_TICKET),Green);Exit; DeleteOrder(OrderValue(2,VAL_TICKET),GreenYellow);Exit; }; If OrderValue(cnt,VAL_TYPE)=OP_SELLSTOP then { DeleteOrder(OrderValue(1,VAL_TICKET),Red);Exit; DeleteOrder(OrderValue(2,VAL_TICKET),Orange);Exit; }; End; For cnt=3 to 4 Begin If OrderValue(cnt,VAL_TYPE)=OP_SELLSTOP then { DeleteOrder(OrderValue(3,VAL_TICKET),Red);Exit; DeleteOrder(OrderValue(3,VAL_TICKET),Orange);Exit; }; End; }; //Trades en cours . If Totaltrades<=2 then { For cnt=1 to 2 Begin If OrderValue(cnt,VAL_TYPE)=OP_BUY then { CloseOrder(OrderValue(1,VAL_TICKET),lots,Bid,0,Green);Exit; CloseOrder(OrderValue(2,VAL_TICKET),lots,Bid,0,GreenYellow);Exit; }; If OrderValue(cnt,VAL_TYPE)=OP_SELL then { CloseOrder(OrderValue(1,VAL_TICKET),lots,Ask,0,Red);Exit; CloseOrder(OrderValue(2,VAL_TICKET),lots,Ask,0,Orange);Exit; }; End; }; For cnt=1 to TotalTrades Begin If OrderValue(cnt,VAL_TYPE)=OP_BUY then { CloseOrder(OrderValue(1,VAL_TICKET),lots,Bid,0,GreenYellow);Exit; }; If OrderValue(cnt,VAL_TYPE)=OP_SELL then { CloseOrder(OrderValue(1,VAL_TICKET),lots,Ask,0,Orange);Exit; }; End; End;
Attached File(s)
|
Oct 12 2005, 7:47
Post
|
|
|
|
as tu backtesté avec "every 1 point" ?
|
Oct 12 2005, 11:54
Post
|
|
|
|
Oui every point!!!!!!!!!!!!!!!!
|
Oct 29 2005, 12:39
Post
|
|
|
|
Salut,
Je vous poste juste un lien que je viens de découvrir où vous trouverz des systèmes écris en mql. Je ne les ai pas encore copier pour les étudier de près donc je ne sais pas ce qu'il valent pour le moment.Mais on peut toujours s'inspirer des systèmes écris par d'autres et trouver de bonnes idées à exploiter pour ses propres systèmes. http://xeatrade.com/trading/10.html @+ |
|
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
2 | danyja | 2,313 | 9th September 2009 - 12:01 Last post by: touco |
|||
![]() |
81 | LeGlac | 29,974 | 6th May 2007 - 17:23 Last post by: LeGlac |
|||
![]() |
21 | pere noel | 9,231 | 12th November 2005 - 21:08 Last post by: laurentol |
|||
![]() |
9 | mounafia | 3,969 | 16th December 2005 - 19:54 Last post by: Dazzz |
|||
![]() |
3 | Alex | 1,743 | 8th February 2006 - 18:28 Last post by: Alex |
|||
| Lo-Fi Version: Coder sur metatrader - Forex Forum |



Sep 16 2005, 14:53


