[Archive] Toute question de débutant, afin de ne pas encombrer le forum. Professionnels, ne passez pas à côté. Je ne peux aller nulle part sans toi - 2. - page 216

 
stalkertula:

Merci pour la réponse, mais j'ai l'algorithme écrit en russe, mais je ne suis pas bon en mql, au moins une astuce sur les fonctions qui fixent le nombre (je l'écrirai dans les paramètres) d'ordres de vente/achat ouverts, et ensuite le signal pour interdire de placer des ordres en attente de sellstop/buystop.

Pourquoi cet algorithme, que vous avez déjà écrit, n'est-il pas reflété dans votre code ?
Pensez-vous qu'en regardant votre code que vous n'avez pas écrit en une seule fois vous pouvez pointer votre erreur ?

Nous avons encore besoin de le "lire"...

Voici un extrait de code où tout ce que nous avons écrit sur un bout de papier apparaît également dans le code :

//================================================================================================================   
//------------------------------- Определение тоннеля и его верхней и нижней границ ------------------------------ 
//================================================================================================================   
   if (NormalizeDouble(MathAbs(MA169-MA144),dg)/pt<=sp)           // Если разница МАшек меньше спреда, ... 
      Tonnel=false;                                               // Тоннель меньше спреда - считаем, что он узкий
   if (NormalizeDouble(MathAbs(MA169-MA144),dg)/pt>sp)            // Если разница МАшек больше спреда, ... 
      Tonnel=true;                                                // Тоннель больше спреда - считаем, что он норм.
//-------------------------------------------------------------      
   if (CmpD(MA169,MA144)) {                                       // Если 169-я МАшка выше 144-й, ...
      UP_Limit=MA169+sp*pt;                                       // ... то 169 - верх тоннеля, ...
      DN_Limit=MA144-sp*pt;                                       // ... а 144 - низ тоннеля
      }
   if (CmpD(MA144,MA169)) {                                       // Если 144-я МАшка выше 169-й, ...
      UP_Limit=MA144+sp*pt;                                       // ... 144 - верх тоннеля, ...
      DN_Limit=MA169-sp*pt;                                       // ... 169 - низ тоннеля
      }
   if (NormalizeDouble(MA169-MA144,dg)==0) {                      // Если 169-я МАшка равна 144-й, ...
      UP_Limit=MA169+sp*pt;                                       // ... то 169 - верх тоннеля, ...
      DN_Limit=MA144-sp*pt;                                       // ... а 144 - низ тоннеля
      }
//-------------------------------------------------------------      
      string NameArUP=Prefix+"UP"+TimeToStr(Time[0]);             // Нарисуем тоннель
      string NameArDN=Prefix+"DN"+TimeToStr(Time[0]);
      SetArrow(4, DeepSkyBlue, NameArUP, Time[0], UP_Limit, 0);   // Его верх
      SetArrow(4, Gold,        NameArDN, Time[0], DN_Limit, 0);   // Его низ
//================================================================================================================   
//------------------------------------- Проверка на вхождение цены в тоннель ------------------------------------- 
//================================================================================================================ 
   if (CmpD(UP_Limit, pa) && CmpD(pb, DN_Limit)) {
      if (Above) {                                                // Если цена была выше тоннеля
         LastAbove=true;                                          // Ставим  флаг "прошлого" положения цены "выше"
         LastBottom=false;                                        // Снимаем флаг "прошлого" положения цены "ниже"
         }
      if (Bottom) {                                               // Если цена была ниже тоннеля
         LastBottom=true;                                         // Ставим  флаг "прошлого" положения цены "ниже"
         LastAbove=false;                                         // Снимаем флаг "прошлого" положения цены "выше"
         }
      Inside=true;                                                // Ставим флаг расположения цены внутри тоннеля
      Above=false;                                                // Сброс флага "над"
      Bottom=false;                                               // Сброс флага "под"
      ReadyTradeB=true;                                           // Флаг готовности к торговле Бай
      ReadyTradeS=true;                                           // Флаг готовности к торговле Селл
      }
//================================================================================================================   
//------------------------------- Проверка на расположение цены относительно тоннеля ----------------------------- 
//================================================================================================================ 
   if (CmpD(pa,UP_Limit)) {                                       // Если цена выше тоннеля
      if (Inside) {
         Inside=false;                                            // Сброс флага нахождения цены внутри тоннеля
         LastInside=true;
         }
      Above=true;                                                 // Цена находится над тоннелем
      Bottom=false;
      }
   if (CmpD(DN_Limit,pb)) {                                       // Если цена ниже тоннеля
      if (Inside) {
         Inside=false;                                            // Сброс флага нахождения цены внутри тоннеля
         LastInside=true;
         }
      Bottom=true;                                                // Цена находится под тоннелем
      Above=false;
      }
//================================================================================================================   
//------------------------------------ Проверка на пересечение границ тоннеля ------------------------------------ 
//================================================================================================================ 
// .... пока не отлажу предыдущее, за это не стоит и браться...
//----------------------------------------------------------------

Donc, jusqu'à ce que la chose la plus simple soit réparée, vous ne devriez pas aller plus loin...

Et qu'est-ce que vous avez ? Vous avez tout empilé, vous n'avez pas commenté une seule ligne. Maintenant, prends une semaine de congé et reviens à ton code. Je suis sûr que ça vous prendra deux heures pour vous en souvenir. 100%

 
coronel:
Lot permanent 0,1.


Dans ce cas, à mon avis, c'est un bon résultat pour la semaine. Je ne me souviens pas exactement, je pense que c'est environ 800 points. Seule la stabilité me semble ne pas être au rendez-vous : la carte n'est pas très lisse... En tout cas, merci pour la réponse. Au moins, une certaine figure se dessine. J'en suis assez loin : 3000-4000 points par an, c'est la limite. Mais mon tableau d'équilibre est plus plat...

J'ai pensé : 0,1 lot fixe - mais avec quel effet de levier ? Le tableau des soldes ne permet pas de savoir clairement combien de points ont été gagnés ?

 

Comment puis-je obtenir la valeur du niveau de Fiba sélectionné à partir d'un tel indicateur ?

//+------------------------------------------------------------------+

//| Parabolic_ZZ.mq4 |

//| Copyright © 2009, Vic2008 |

//| |

//+------------------------------------------------------------------+

#property copyright "Copyright © 2009, Vic2008"

#propriété lien ""

#include <stdlib.mqh>

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 Red

#propriété indicator_color2 Magenta

//---- paramètres d'entrée

extern double SAR_step=0.02 ; //paramètres paraboliques.

extern double SAR_maximum=0.2 ;

extern int BarsCount = 500 ; //Distance en barres pour dessiner l'indicateur.

extern bool Fibo1_off = False ; //Désactivation des niveaux de Fibo.

extern bool Fibo2_off = False ;

extern bool Fibo_Absolut_Value = False ; //Inclure les valeurs absolues des prix aux niveaux Fibo.

extern color Label_Color = Gray ;

extern color Fibo_Color = Blue ;

//---- tampons

double ExtMapBuffer1[] ;

double ExtMapBuffer2[] ;

//+------------------------------------------------------------------+

//| Fonction d'initialisation de l'indicateur personnalisé |

//+------------------------------------------------------------------+

int init()

{

//---- indicateurs

SetIndexBuffer(0,ExtMapBuffer1) ;

SetIndexStyle(0,DRAW_SECTION) ;

SetIndexBuffer(1,ExtMapBuffer2) ;

SetIndexStyle(1,DRAW_SECTION,0,2,Magenta) ;

//----

retour(0) ;

}

//+------------------------------------------------------------------+

//| Fonction personnalisée de désinitialisation de l'indicateur |

//+------------------------------------------------------------------+

int deinit()

{

//----

ObjetsDeleteAll(0,OBJ_ARROW) ;

ObjectDelete("FiboZZLast") ;

ObjectDelete("FiboZZPrev") ;

//----

retour(0) ;

}

//+------------------------------------------------------------------+

//| Fonction d'itération de l'indicateur personnalisé |

//+------------------------------------------------------------------+

int start()

{

//int counted_bars=IndicatorCounted() ;

chaîne de caractères txt ;

int w,PosLow,PosHigh ;

double LPic=1000000,HPic=0,price;

datetime TimeTmp ;

//----

ExtMapBuffer1[0]=Close[0];

ExtMapBuffer2[0]=EMPTY_VALUE ;

for( w=0;w<BarsCount;w++){

if( w!=0 ){ ExtMapBuffer1[w]=EMPTY_VALUE ; ExtMapBuffer2[w]=EMPTY_VALUE ; }

if( iSAR(NULL,0,SAR_step,SAR_maximum,w) > Close[w] && LPic>=Low[w] ){ LPic=Low[w] ; PosLow=w ; }

if( iSAR(NULL,0,SAR_step,SAR_maximum,w) < Close[w] && HPic<=High[w] ){ HPic=High[w] ; PosHigh=w ; }

// H -> L

if( iSAR(NULL,0,SAR_step,SAR_maximum,(w+1)) > Close[w+1] && iSAR(NULL,0,SAR_step,SAR_maximum,w) < Close[w] && HPic!=0)

{

ExtMapBuffer1[PosHigh]=HPic ;

ExtMapBuffer2[PosHigh]=HPic ;

HPic=0 ;

}

// L -> H

if( iSAR(NULL,0,SAR_step,SAR_maximum,w) < Close[w] && iSAR(NULL,0,SAR_step,SAR_maximum,w+1) > Close[w+1] && LPic!=1000000 )

{

ExtMapBuffer1[PosLow]=LPic ;

ExtMapBuffer2[PosLow]=LPic ;

LPic=1000000 ;

}

}

if( Fibo1_off ) ObjectDelete("FiboZZLast") ;

if( Fibo2_off ) ObjectDelete("FiboZZPrev") ;

//Dessiner les marques de prix et les niveaux FIBO

int wave_cnt=0 ;

for( w=0;w<BarsCount;w++){

if( ExtMapBuffer2[w]!=EMPTY_VALUE ){

si( wave_cnt<=3 ){

ObjectDelete("PZZ_"+DoubleToStr( wave_cnt, 0)) ;

ObjectCreate("PZZ_"+DoubleToStr( wave_cnt, 0), OBJ_ARROW, 0, Time[w], ExtMapBuffer2[w], Time[w], 0) ;

ObjectSet("PZZ_"+DoubleToStr( wave_cnt, 0), OBJPROP_ARROWCODE, SYMBOL_LEFTPRICE ) ;

ObjectSet("PZZ_"+DoubleToStr( wave_cnt, 0), SYMBOL_LEFTPRICE, ExtMapBuffer2[w]) ;

ObjectSet("PZZ_"+DoubleToStr( wave_cnt, 0), OBJPROP_COLOR, Label_Color ) ;

if(wave_cnt==1 && Fibo1_off==False ){

ObjectDelete("FiboZZLast") ;

ObjectCreate("FiboZZLast", OBJ_FIBO, 0, TimeTmp, ExtMapBuffer2[w], TimeTmp, price) ;

ObjectSet("FiboZZLast", OBJPROP_LEVELCOLOR, Fibo_Color) ;

ObjectSet("FiboZZLast", OBJPROP_COLOR, Fibo_Color) ;

ObjectSet("FiboZZLast", OBJPROP_RAY, False );// Pour activer les rayons, remplacez False par True.

ObjectSet("FiboZZLast", OBJPROP_FIBOLEVELS, 14) ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+0,0.236) ; ObjectSetFiboDescription("FiboZZLast",0, "23.6") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+1,0.382) ; ObjectSetFiboDescription("FiboZZLast",1, "38.2") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+2,0.50) ; ObjectSetFiboDescription("FiboZZLast",2, "50.0") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+3,0.618) ; ObjectSetFiboDescription("FiboZZLast",3, "61.8") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+4,1.0) ; ObjectSetFiboDescription("FiboZZLast",4, "100.0") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+5,1.618) ; ObjectSetFiboDescription("FiboZZLast",5, "161.8") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+6,2.618) ; ObjectSetFiboDescription("FiboZZLast",6, "261.8") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+7,4.236) ; ObjectSetFiboDescription("FiboZZLast",7, "423.6") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+8,0.088) ; ObjectSetFiboDescription("FiboZZLast",8, "8.8") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+9,0.145) ; ObjectSetFiboDescription("FiboZZLast",9, "14.5") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+10,0.764) ; ObjectSetFiboDescription("FiboZZLast",10, "76.4") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+11,0.855) ; ObjectSetFiboDescription("FiboZZLast",11, "85.5") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+12,0.921) ; ObjectSetFiboDescription("FiboZZLast",12, "92.1") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+13,0.0) ; ObjectSetFiboDescription("FiboZZLast",13, "0.0") ;

if( Fibo_Absolut_Value ){

ObjectSet("FiboZZLast", OBJPROP_FIBOLEVELS, 14) ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+0,0.236) ; ObjectSetFiboDescription("FiboZZLast",0, "23.6 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+1,0.382) ; ObjectSetFiboDescription("FiboZZLast",1, "38.2 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+2,0.50) ; ObjectSetFiboDescription("FiboZZLast",2, "50.0 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+3,0.618) ; ObjectSetFiboDescription("FiboZZLast",3, "61.8 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+4,1.0) ; ObjectSetFiboDescription("FiboZZLast",4, "100.0 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+5,1.618) ; ObjectSetFiboDescription("FiboZZLast",5, "161.8 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+6,2.618) ; ObjectSetFiboDescription("FiboZZLast",6, "261.8 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+7,4.236) ; ObjectSetFiboDescription("FiboZZLast",7, "423.6 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+8,0.088) ; ObjectSetFiboDescription("FiboZZLast",8, "8.8 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+9,0.145) ; ObjectSetFiboDescription("FiboZZLast",9, "14.5 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+10,0.764) ; ObjectSetFiboDescription("FiboZZLast",10, "76.4 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+11,0.855) ; ObjectSetFiboDescription("FiboZZLast",11, "85.5 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+12,0.921) ; ObjectSetFiboDescription("FiboZZLast",12, "92.1 %$") ;

ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+13,0.0) ; ObjectSetFiboDescription("FiboZZLast",13, "0.0") ;

}

}

if( wave_cnt==2 && Fibo2_off==False ){

ObjectDelete("FiboZZPrev") ;

ObjectCreate("FiboZZPrev", OBJ_FIBO, 0, TimeTmp, ExtMapBuffer2[w], TimeTmp, price) ;

ObjectSet("FiboZZPrev", OBJPROP_LEVELCOLOR, Fibo_Color) ;

ObjectSet("FiboZZPrev", OBJPROP_COLOR, Fibo_Color) ;

ObjectSet("FiboZZPrev", OBJPROP_RAY, False );// Pour activer les rayons, remplacez False par True.

ObjectSet("FiboZZPrev", OBJPROP_FIBOLEVELS, 14) ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+0,0.236) ; ObjectSetFiboDescription("FiboZZPrev",0, "23.6") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+1,0.382) ; ObjectSetFiboDescription("FiboZZPrev",1, "38.2") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+2,0.50) ; ObjectSetFiboDescription("FiboZZPrev",2, "50.0") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+3,0.618) ; ObjectSetFiboDescription("FiboZZPrev",3, "61.8") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+4,1.0) ; ObjectSetFiboDescription("FiboZZPrev",4, "100.0") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+5,1.618) ; ObjectSetFiboDescription("FiboZZPrev",5, "161.8") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+6,2.618) ; ObjectSetFiboDescription("FiboZZPrev",6, "261.8") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+7,4.236) ; ObjectSetFiboDescription("FiboZZPrev",7, "423.6") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+8,0.088) ; ObjectSetFiboDescription("FiboZZPrev",8, "8.8") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+9,0.145) ; ObjectSetFiboDescription("FiboZZPrev",9, "14.5") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+10,0.764) ; ObjectSetFiboDescription("FiboZZPrev",10, "76.4") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+11,0.855) ; ObjectSetFiboDescription("FiboZZPrev",11, "85.5") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+12,0.921) ; ObjectSetFiboDescription("FiboZZPrev",12, "92.1") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+13,0.0) ; ObjectSetFiboDescription("FiboZZPrev",13, "0.0") ;

if( Fibo_Absolut_Value ){

ObjectSet("FiboZZPrev", OBJPROP_FIBOLEVELS, 14) ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+0,0.236) ; ObjectSetFiboDescription("FiboZZPrev",0, "23.6 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+1,0.382) ; ObjectSetFiboDescription("FiboZZPrev",1, "38.2 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+2,0.50) ; ObjectSetFiboDescription("FiboZZPrev",2, "50.0 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+3,0.618) ; ObjectSetFiboDescription("FiboZZPrev",3, "61.8 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+4,1.0) ; ObjectSetFiboDescription("FiboZZPrev",4, "100.0 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+5,1.618) ; ObjectSetFiboDescription("FiboZZPrev",5, "161.8 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+6,2.618) ; ObjectSetFiboDescription("FiboZZPrev",6, "261.8 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+7,4.236) ; ObjectSetFiboDescription("FiboZZPrev",7, "423.6 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+8,0.088) ; ObjectSetFiboDescription("FiboZZPrev",8, "8.8 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+9,0.145) ; ObjectSetFiboDescription("FiboZZPrev",9, "14.5 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+10,0.764) ; ObjectSetFiboDescription("FiboZZPrev",10, "76.4 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+11,0.855) ; ObjectSetFiboDescription("FiboZZPrev",11, "85.5 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+12,0.921) ; ObjectSetFiboDescription("FiboZZPrev",12, "92.1 %$") ;

ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+13,0.0) ; ObjectSetFiboDescription("FiboZZPrev",13, "0.0") ;

}

}

}

wave_cnt++ ;

prix=ExtMapBuffer2[w] ;

TimeTmp=Time[w] ;

}

}



//----

retour(0) ;

}

//+------------------------------------------------------------------+

 
lagriv:

Comment obtenir la valeur du niveau de fibre sélectionné à partir d'un tel indicateur ?

C'est quoi ce bordel ?

vous pourriez vouloir mettre "guerre et paix" là-dedans aussi.

 

Aidez-nous s'il vous plaît... mon conseiller expert vérifie les ordres ouverts ... un ordre peut être ouvert à la fois ... mais lorsque je saisis un stop sur une ligne droite au moment de l'ouverture d'un ordre, il émet une erreur 130... par exemple, c'était comme ceci

si(down>0)

{

ticket=OrderSend(Symbol(),OP_SELL,dLot,Bid,3,0,Bid-TakeProfit*Point,0,16384,0,Red) ;

Je tape un arrêt de taille 100

ticket=OrderSend(Symbol(),OP_SELL,dLot,Bid,3,100,Bid-TakeProfit*Point,0,16384,0,Red) ; ...donne l'erreur 130 dans le testeur

DTz Alpari...peut-être devrais-je modifier p après ouvrir un ordre et placer un stop ?..dites-moi comment faire approximativement ou indiquez-moi un EA qui fait cela...svp

 
ilmur:

Aidez-nous s'il vous plaît...

100*Point
 
ilmur:

Aidez-nous s'il vous plaît... le conseiller dispose d'une fonction de contrôle des ordres ouverts... un seul ordre peut être ouvert à la fois... mais si vous saisissez une taille d'arrêt directement au moment de l'ouverture...

un nouvel ordre peut être modifié après son ouverture et un stop peut être fixé ... pourriez-vous me conseiller sur la manière de procéder ou m'indiquer un EA où cela est fait ... s'il vous plaît.


Un arrêt doit être de type double. Le prix auquel le stop doit être fixé doit être spécifié.

extern double   Lot=1;// Лот ордера при ручном управлении.
extern int      StopLoss=100;//СтопЛосс ордера при ручном управлении
extern int      TakeProfit=100;//ТейкПрофит ордера при ручном управлении
extern int      MAGIC=467003; // У ордеров открытых вручную MAGIC=0
extern int      Proskalz=10; //Проскальзывание
..........
double PR,SL,TP;
..............
PR=PR=NormalizeDouble(Ask,Digits);
if(StopLoss==0){
  SL=0;
}
if(StopLoss>0){
  SL=PR-StopLoss*Point;
}
if(TakeProfit==0){
 TP=0;
}
if(TakeProfit>0){
  TP=PR+TakeProfit*Point;
}
SL=NormalizeDouble(SL,Digits);
TP=NormalizeDouble(TP,Digits);
int TicketBuy=OrderSend(Symbol(),OP_BUYSTOP,Lot,PR,Proskalz,SL,TP,NULL,MAGIC,0,CLR_NONE);
if(TicketBuy==(-1)){
  Print("Ошибка № "GetLastError()," при установке Бай-ордера");
}
 
alsu:
100*Point
Merci beaucoup à tous ceux qui ont répondu
 
artmedia70:

Pourquoi cet algorithme que vous avez déjà écrit n'est-il pas reflété dans votre code ?
Pensez-vous que le simple fait de regarder votre code non formaté vous permet de repérer immédiatement votre erreur ?

Vous devez encore le "lire"...

Voici un extrait du code où tout ce que vous avez esquissé sur un bout de papier apparaît également dans le code :

Donc, jusqu'à ce que vous réussissiez la chose la plus simple, vous ne devriez pas aller plus loin...

Et vous ? Vous avez tout empilé, vous n'avez pas commenté une seule ligne. Maintenant, prends une semaine de congé et reviens à ton code. Je suis sûr que ça vous prendra deux heures pour vous en souvenir. 100%


Je suis désolé, le code n'est pas de moi, je l'apprends tout seul, c'était un morceau concernant les ordres en attente, le reste c'est du blabla, comme d'habitude réglages, lots, fractales, chalutage. Cet EA ne fonctionne pas, c'est-à-dire qu'il perd à cause des ordres empilés, j'ai donc décidé de placer quelques restrictions et de voir ce qui se passe. J'utiliserai le langage mql mais je n'ai aucune idée de ce qu'il faut faire avec. Je ne sais pas comment l'utiliser.
 
stalkertula:
Désolé, le code n'est pas de moi, je l'étudie moi-même. C'était une partie concernant les ordres en attente, le reste était du blabla, comme on le fait habituellement avec les paramètres, les lots, les fractales et le chalut. Cet EA ne fonctionne pas, c'est-à-dire qu'il perd à cause des ordres empilés, j'ai donc décidé de placer quelques restrictions et de voir ce qui se passe. J'utiliserai le langage mql mais je n'ai aucune idée de ce qu'il faut faire avec. Merci, je vais m'en occuper.

C'est bizarre. Qu'est-ce qu'il y a à s'excuser ? Eh bien... Je vous ai montré comment concevoir vos propres codes, afin que vous n'ayez pas à vous en occuper plus tard.

Et puisque votre code est celui de quelqu'un d'autre... Mais... Vous pouvez également commenter les chaînes dont la signification vous est apparue clairement au cours de l'analyse. Après cela, il sera plus facile à comprendre, et vous feriez mieux d'écrire votre propre texte sur la base de celui qui a été analysé. Donc pour bien comprendre, comprendre et convertir selon vos propres besoins.

C'estexactement ce qui vous mènera à une compréhension logique. Ce sera également bon pour vous. :)
Bonne chance !

Raison: