Cualquier pregunta de los recién llegados sobre MQL4 y MQL5, ayuda y discusión sobre algoritmos y códigos - página 988

 
-nan(ind) ¿no hay valor?
 
Yevhenii Levchenko:
-nan(ind) no es un número?

no un número

 
Yevhenii Levchenko:

sizeof() devuelve el tamaño del tipo de variable


Así es. Un array es una colección de datos del mismo tipo. Si lo escribes así

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 pasas alguna de estas matrices a una función, habrá una pregunta 52 por qué.

 
¿Hay algún script para mt5 para eliminar todos los gráficos de flechas restantes después de las operaciones abiertas, de lo contrario es mucho tiempo para eliminar manualmente los objetos uno por uno.
 
Konstantin Lebedev:
Hay algún script para mt5 que borre todos los gráficos restantes en forma de flechas después de abrir operaciones, porque lleva mucho tiempo borrar manualmente los objetos uno por uno.

No es necesario que lo hagas uno por uno, puedes eliminar todos los objetos gráficos a la vez de una sola vez:


 
Konstantin Lebedev:
¿Hay algún script para mt5 para eliminar todas las pantallas gráficas restantes en forma de flechas después de abrir las operaciones, de lo contrario es largo para eliminar los objetos manualmente uno por uno.

El baterista no entiende de qué se trata la pregunta. En la pestaña "Historial" o "Comercio", menú contextual y eliminar todo de una vez. También puedes desactivar la adición.


 
Hola. Todavía (lentamente, ¿cuál es la prisa?) dominando MT5. Enfrentados a no entender el disco. Sugerencia o si hay un indicador con una línea de amortiguación por el tiempo por favor envíeme el enlace)) Gracias
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;
 }
}

Haciendo
 

Ayuda por favor


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

//| Lex_Bands.mq4 ||
//| Lex |
//| |
//+------------------------------------------------------------------+
#property copyright "Lex"
#propiedad estricta
#propiedad ventana_del_gráfica_del_indicador
#property indicator_buffers 3
#property indicator_plots 3
//--- trazar Línea_Intermedia
#property indicator_label1 "Middle_Line"
#property indicator_type1 DRAW_LINE
#property indicator_color1 clrLightSeaGreen
#property indicator_style1 STYLE_SOLID
#property indicator_width1 2
//--- trazar la línea ascendente
#property indicator_label2 "Up_Line"
#property indicator_type2 DRAW_LINE
#property indicator_color2 clrLightSeaGreen
#property indicator_style2 STYLE_SOLID
#property indicator_width2 2
//--- plot_Line
#property indicator_label3 "Down_Line"
#property indicator_type3 DRAW_LINE
#property indicator_color3 clrLightSeaGreen
#property indicator_style3 STYLE_SOLID
#property indicator_width3 2
//--- parámetros del indicador
input int InpBandsPeriod=20; // Periodo MA
input int OtklPeriod=20; // Periodo de Otkloneniya
input int OtklShag=5; // Shag Otkloneniya
input int MA_Type=0; // Tipo de MA 0 - SMA, 1 - EMA, 2 - SMMA, 3 - LWMA
input int Precio_aplicado=4; // 0 - Precio_cerrado, 1 - Precio_abierto, 2 - Precio_alto, 3 - Precio_bajo, 4 - Precio_medio, 5 - Precio_típico, 6 - Precio_ponderado

//--- topes indicadores
double_LineBuffer[];
double_LineBuffer[];
double_LineBuffer[]; double Down_LineBuffer[];

//+------------------------------------------------------------------+
//| Función de inicialización de indicadores personalizada |
//+------------------------------------------------------------------+
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);
return(0);
}
//+------------------------------------------------------------------+
//| Función de iteración de indicadores personalizada |
//+------------------------------------------------------------------+
int inicio()
{
int barras_contadas = IndicadorContado();
if(counted_bars < 0) return(-1);
if(counted_bars > 0) counted_bars;
int límite = Bares - barras_contadas;
if(counted_bars==0) limit--;
double dOtklSumMax[];
doble SrOtklMax[];
double dOtklSumMin[];
doble SrOtklMin[];
for(int i=1;i<=limit;i++)
{
for(int j=i;j<=i+OtklPeriod;j=j+OtklShag)
{
double max=Alto[iAlto(NULL,0,MODO_ALTO,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];
}
return(0);
}

Aquí está el código del indicador. No tiene errores cuando se compila, pero no muestra nada en el gráfico.
 
Xander1603:

Por favor, ayuda.

...

Aquí está el código del indicador. No da ningún error al compilar, pero no muestra nada en el gráfico.

Introduzca el código correctamente:


Y no crees muchos temas con una simple pregunta.

 
¿Cómo se convierte una cadena en un enum?
Razón de la queja: