Toute question des nouveaux arrivants sur MQL4 et MQL5, aide et discussion sur les algorithmes et les codes. - page 988

 
-nan(ind) n'y a-t-il pas de valeur ?
 
Yevhenii Levchenko:
-nan(ind) n'est pas un nombre ?

pas un numéro

 
Yevhenii Levchenko:

sizeof() renvoie la taille de la variable de type


C'est vrai. Un tableau est une collection de données du même type. Si vous l'écrivez comme ceci

int masiv[1];
Print(sizeof(masiv));//вернёт 4, потому что int 4 байта, если так masiv[2]- будет 8.
int Perem;
Print(sizeof(Perem));//вернёт 4, потому что int 4 байта
//если записать вот так
int masiv[];
Print(sizeof(masiv));вернёт 52 вне зависимости где и как объявлен массив.
//если записать вот так
int masiv[][3][3];
Print(sizeof(masiv));вернёт 52.


Si vous passez l'un de ces tableaux dans une fonction, il y aura une question 52 pourquoi.

 
Il y a t-il un script pour mt5 pour supprimer tous les graphiques de flèches restants après l'ouverture des trades, sinon c'est un long moment pour supprimer manuellement les objets un par un.
 
Konstantin Lebedev:
Existe-t-il un script pour mt5 permettant de supprimer tous les affichages graphiques restants sous forme de flèches après l'ouverture de trades, car cela prend beaucoup de temps de supprimer manuellement les objets un par un.

Vous n'avez pas besoin de le faire un par un, vous pouvez supprimer tous les objets graphiques en une seule fois :


 
Konstantin Lebedev:
Existe-t-il un script pour mt5 permettant de supprimer tous les affichages graphiques restants sous forme de flèches après l'ouverture de trades, sinon cela prend beaucoup de temps de supprimer manuellement les objets un par un.

Le batteur ne comprend pas l'objet de la question. Dans l'onglet "Historique" ou "Commerce", menu contextuel et suppression en une seule fois. Vous pouvez également désactiver l'ajout.


 
Bonjour. Je suis toujours en train de maîtriser (lentement, pourquoi se presser ?) MT5. Face à l'incompréhension du dossier. Indice ou s'il existe un indicateur avec une ligne tampon par temps, veuillez m'envoyer le lien))). Merci
for(int i=limit; i>=0; i--)
{
...

MqlDataTime tm;
TimeToStruct(time[i],tm);

if(tm.hour==18 && tm.min==30 && Period()<=PERIOD_H1)
 {
//функция для создания таймлинии (вертикальная) ВСЕ ОК!

//КАК ВЫГЛЯДИТ ЗАПИСЬ СОЗДАНИЯ БУФЕРНОЙ ЛИНИИ ? ТАК НЕ ПОЛУЧАТСЯ 
for(int j=shift; j>=0; j--)
 {
CL=iClose(NULL,_Period,j);
Buff[i]=close[j]; // =CL;

if(Buff[j-1]!=Buff[j])
Buff[j-1]=EMPTY_VALUE;
 }
}

Faire
 

Aide, s'il vous plaît


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

//| Lex_Bands.mq4 |
//| Lex |
//| |
//+------------------------------------------------------------------+
#property copyright "Lex"
#propriété stricte
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_plots 3
//--- plot Middle_Line
#property indicator_label1 "Ligne_moyenne"
#property indicator_type1 DRAW_LINE
#propriété indicator_color1 clrLightSeaGreen
#propriété indicator_style1 STYLE_SOLID
#property indicator_width1 2
//--- plot Up_Line
#property indicator_label2 "Ligne_haut"
#property indicator_type2 DRAW_LINE
#propriété indicator_color2 clrLightSeaGreen
#propriété indicator_style2 STYLE_SOLID
#property indicator_width2 2
//--- plot_Line
#property indicator_label3 "Down_Line"
#property indicator_type3 DRAW_LINE
#propriété indicateur_color3 clrLightSeaGreen
#propriété indicator_style3 STYLE_SOLID
#propriété indicator_width3 2
//--- paramètres de l'indicateur
input int InpBandsPeriod=20 ; // Période MA
input int OtklPeriod=20 ; // Période d'Otkloneniya
input int OtklShag=5 ; // Shag Otkloneniya
input int MA_Type=0 ; // Type de MA 0 - SMA, 1 - EMA, 2 - SMMA, 3 - LWMA
input int Applied_Price=4 ; // 0 - PRICE_CLOSE, 1 - PRICE_OPEN, 2 - PRICE_HIGH, 3 - PRICE_LOW, 4 - PRICE_MEDIAN, 5 - PRICE_TYPICAL, 6 - PRICE_WEIGHTED

//--- tampons indicateurs
double_LineBuffer[] ;
double_LineBuffer[] ;
double_LineBuffer[] ; double Down_LineBuffer[] ;

//+------------------------------------------------------------------+
//| Fonction d' initialisation de l'indicateur personnalisé |
//+------------------------------------------------------------------+
int OnInit()
{
IndicatorBuffers(7) ;
SetIndexBuffer(0,Middle_LineBuffer) ;
SetIndexStyle(0,DRAW_LINE) ;
SetIndexBuffer(1,Up_LineBuffer) ;
SetIndexStyle(1,DRAW_LINE) ;
SetIndexBuffer(2,Down_LineBuffer) ;
SetIndexStyle(2,DRAW_LINE) ;
retour(0) ;
}
//+------------------------------------------------------------------+
//| Fonction d'itération de l'indicateur personnalisé |
//+------------------------------------------------------------------+
int start()
{
int counted_bars = IndicatorCounted() ;
si(barres comptées < 0) retour(-1) ;
if(counted_bars > 0) counted_bars ;
int limite = Bars - counted_bars ;
si(counted_bars==0) limit-- ;
double dOtklSumMax[] ;
double SrOtklMax[] ;
double dOtklSumMin[] ;
double SrOtklMin[] ;
for(int i=1;i<=limit;i++)
{
for(int j=i;j<=i+OtklPeriod;j=j+OtklShag)
{
double max=High[iHighest(NULL,0,MODE_HIGH,OtklShag,j)] ;
double min=Low[iLowest(NULL,0,MODE_HIGH,OtklShag,j)] ;
double Otklmax=max-iMA(NULL,0,InpBandsPeriod,0,MA_Type,Applied_Price,j) ;
double Otklmin=iMA(NULL,0,InpBandsPeriod,0,MA_Type,Applied_Price,j)-min ;
doubleOtklmax=Otklmax*Otklmax ;
dOtklSumMax[j]=dOtklSumMax[j-1]+dOtklSumMax[j] ;
dOtklSumMax[OtklShag]=dOtklSumMax[j] ;
double dOtklmin=Otklmax*Otklmax ;
dOtklSumMin[j]=dOtklSumMin[j-1]+dOtklSumMin[j] ;
dOtklSumMin[OtklShag]=dOtklSumMin[j] ;
}
Middle_LineBuffer[i]=iMA(NULL,0,InpBandsPeriod,0,MA_Type,Applied_Price,i) ;
SrOtklMax[i]=MathSqrt(dOtklSumMax[OtklShag]/(OtklPeriod/OtklShag)) ;
SrOtklMin[i]=MathSqrt(dOtklSumMin[OtklShag]/(OtklPeriod/OtklShag)) ;
Up_LineBuffer[i]=iMA(NULL,0,InpBandsPeriod,0,MA_Type,Applied_Price,i)+SrOtklMax[i] ;
Down_LineBuffer[i]=iMA(NULL,0,InpBandsPeriod,0,MA_Type,Applied_Price,i)-SrOtklMin[i] ;
}
retour(0) ;
}

Voici le code de l'indicateur. Il n'y a pas d'erreur lors de la compilation, mais il ne montre rien sur le graphique.
 
Xander1603:

Aidez-moi, s'il vous plaît.

...

Voici le code de l'indicateur. Il ne donne aucune erreur lors de la compilation, mais il n'affiche rien du tout sur le graphique.

Insérez le code correctement :


Et ne créez pas de nombreux sujets avec une simple question.

 
Comment convertir une chaîne en un enum ?
Raison: