[Toute question de débutant, afin de ne pas encombrer le forum. Professionnels, ne passez pas votre chemin. Je ne peux aller nulle part sans toi. - page 250

 
AndBar >> :
Zdravstvyjte, vopros k znatokam. Est lu fynktsuya v mql4 kotoraya proveryala bu ne zanyat lu torgovuj potok ( ochered na otsulky ordersov ) v termunale, a to ya proveryayu cherz globalnue peremennue v kotorue zanoshy danue ne zanyat lu potok. Zaranee spasubo.

IsTradeContextBusy()

Voici les fonctions de contrôle d'état. https://docs.mql4.com/ru/check

PS : je ne suis pas un expert. :(

 

A goldtrader : spasubo.


U eshche vopros :


Pru testurovanuu, razresheno tester zaburat sovetnuky dannue uz kakovo nubyd fajla ?, (hochy proverut na profutnost odny multuvalyutnyu strateguyu)


Zaranee spasubo.

 
AndBar писал(а) >>

A goldtrader : spasubo.

U eshche vopros :

Pru testurovanuu, razresheno tester zaburat sovetnuky dannue uz kakovo nubyd fajla ?, (hochy proverut na profutnost odny multuvalyutnyu strateguyu)

Zaranee spasubo.

Le conseiller expert peut se référer directement à d'autres instruments et d'autres périodes. Vous n'êtes pas obligé d'utiliser un fichier. Mais cela peut être fait avec l'aide de ce fichier.

 
Vinin >> :

L'EA peut se référer directement à d'autres instruments et échéances. Vous n'êtes pas obligé d'utiliser un fichier. Bien que nous puissions tout faire à travers lui (le fichier).

Bolshoe spasubo, poprobyem chto uz etogo polychutsya.

 

Aide ind. ne dessine pas de SMA !!!

//+------------------------------------------------------------------+
//|                                                maalert  sma.mq4 |
//|                      Copyright © 2009, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 Red

extern int PeriodMA= 55;
extern int METHOD_MA=MODE_SMA;
extern int X= 1;
extern int Limit=5440;
extern string    SoundFileName="alert.wav";
extern bool      ActiveSignal=true;
extern bool      ActiveAlert=true;

double maH;
double maL;
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0, maH);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1, maL);
   SetIndexLabel(0,"MA");
//----
   return(0);
  }
//+------------------------------------------------------------------+
int start()
  {
//--------------------------------------------------------------
   maL         = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_LOW,  0);
   maH         = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_HIGH, 0);
 //--------------------------------------------------------------
  if(Bid> maH)
   {
   Alert("eu Buy" );
   if( SoundFileName!="" )
         PlaySound( SoundFileName );} // Звуковой сигнал}
   //----
   
   
   if(Bid< maL)
   {
   Alert("eu Buy" );
   if( SoundFileName!="" )
         PlaySound( SoundFileName );} // Звуковой сигнал}
   //----
   return(0);
  }
//+------------------------------------------------------------------+
qu'est-ce qui manque ? Merci.
 
costy_ писал(а) >>

Aide ind. ne dessine pas de SMA !!!

Qu'est-ce que tu as manqué ? >> Merci.

Et tu n'as rien fait pour qu'il devienne nul.

 
Roger >> :

Et tu n'as rien fait pour qu'il devienne nul.

Alors quoi exactement...

SetIndexDrawBegin(0,0);
,,,
 
costy_ >> :

L'ind. d'aide ne dessine pas de SMA !!!

Qu'est-ce que tu as manqué ? >>Merci.

Posmotru kak zanosyatsya danue v byfer dlya rusovanuya lunuu v bydj kakom prostom unduke, u vse voprosu otpadyt


Dlya prumera :


double ExtMapBuffer1[];
double ExtMapBuffer2[];
-------------------- 


ExtMapBuffer1[i]
  = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_LOW,  0);
ExtMapBuffer2[i]
 = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_HIGH, 0);

ny u eto vse delo oformu v tsukl

 
AndBar >> :

Posmotru kak zanosyatsya danue v byfer dlya rusovanuya lunuu v bydj kakom prostom unduke, u vse voprosu otpadyt


Dlya prumera :


>> Merci !

//+------------------------------------------------------------------+
//|                                                maalert  sma.mq4 |
//|                      Copyright © 2009, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 Red

extern int PeriodMA= 55;
extern int METHOD_MA=MODE_SMA;
extern int X= 1;
extern int Limit=5440;
extern string    SoundFileName="alert.wav";
extern bool      ActiveSignal=true;
extern bool      ActiveAlert=true;

double maH[];
double maL[];
int i;
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0, maH[ i]);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1, maL[ i ]);
   SetIndexLabel(0,"MA");
//----
   return(0);
  }
//+------------------------------------------------------------------+
int start()
  {
//--------------------------------------------------------------
   maL[ i]         = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_LOW,  0);
   maH[ i]         = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_HIGH, 0);
 //--------------------------------------------------------------
  if(Bid> maH[ i])
   {
   Alert("eu Buy" );
   if( SoundFileName!="" )
         PlaySound( SoundFileName );} // Звуковой сигнал}
   //----
   
   
   if(Bid< maL[ i])
   {
   Alert("eu Buy" );
   if( SoundFileName!="" )
         PlaySound( SoundFileName );} // Звуковой сигнал}
   //----
   return(0);
  }
//+------------------------------------------------------------------+

Je pense que ça devrait l'être, mais ça ne l'est pas :(
 

Comment programmer correctement une sortie lors d'un croisement inverse de la ligne principale et de la ligne de signal? parce que les signaux arrivent dans des intervalles de temps courts... et les ordres ne sont pas fermés là où ils devraient l'être dans la condition...

cette question me taraude depuis longtemps ! S'IL VOUS PLAÎT !

Voici la condition de sortie :

main_1=iCustom(NULL, 0, "i_Trend", 0, 0); // главная линия на 0м баре
main_2=iCustom(NULL, 0, "i_Trend", 0, 1); // главная линия на 1м баре
signal_1=iCustom(NULL, 0, "i_Trend", 1, 0); // сигнальная линия на 0м баре
signal_2=iCustom(NULL, 0, "i_Trend", 1, 1); // сигнальная линия на 1м баре
//----
   for(int i=0; i<OrdersTotal(); i++)
     {
      if(OrderSelect( i, SELECT_BY_POS, MODE_TRADES)==false)        break;
      if(OrderMagicNumber()!= MAGICMA || OrderSymbol()!=Symbol()) continue;
      //---- check order type 
      if(OrderType()==OP_BUY)
        {
         if( main_1< signal_1 && !( main_2< signal_2)) OrderClose(OrderTicket(),OrderLots(),Bid,3,White);
         break;
        }
      if(OrderType()==OP_SELL)
        {
         if( main_1> signal_1 && !( main_2> signal_2)) OrderClose(OrderTicket(),OrderLots(),Ask,3,White);
         break;
        }
Raison: