Cualquier pregunta de novato, para no saturar el foro. Profesionales, no pasen de largo. En ninguna parte sin ti - 6. - página 488

 
Hay dos indicadores Ind_1 e Ind_GV. El indicador Ind_GV se diferencia del Ind_1 en que recibe uno de los valores de ajuste de la variable global del terminal cliente.
Cuando los ajustes de Ind_1 e Ind_GV coinciden, Ind_GV tiene un valor de resultado ligeramente diferente al de Ind_1.
Si detengo el comprobador mientras Ind_1 e Ind_GV coinciden y compilo Ind_GV, el valor resultante de ambos indicadores coincide completamente.
¿Quién sabe cómo se puede explicar esto?
 

¿Pueden decirme si necesito algún código en el Asesor Experto para que se ejecute en el probador de estrategias en modo de optimización?

Estoy tratando de optimizar mi Asesor Experto, pero no sé lo que es:


2014.02.18 21:54:30.386 Comprobador: se ha encontrado el archivo de caché "C:\N-tester\Caches\Test.NZDUSD5.0" y se puede utilizar para una mayor optimización

2014.02.18 21:54:30.388 TestGenerator: se ha encontrado el archivo de ticks real "C:\...\tester\history\NZDUSD5_0.fxt"

Tenemos historia. El archivo NZDUSD5_0.fxt pesa unos 150 metros.

También se puede ver esto en los registros de los probadores

2014.02.18 22:50:21.251 TestGenerator: error de datos no coincidentes (se ha superado el límite de volumen 305 en 2014.02.12 13:35)

¿De qué se trata?


 

Ayuda, por favor.

Cada una de las variables puede tomar un valor de 1 a 5...Dime cómo no escribir 3125 opciones)))

   if  (Kx==5&&     K>T &&     K>SA &&     K>SB &&     K>Bid &&
        Tx==4&&     T<K &&     T>SA &&     T>SB &&     T>Bid && 
        SAx==3&&    SA<K &&    SA<T &&     SA>SB &&    SA>Bid &&
        SBx==2&&    SB<K &&    SB<T &&     SB<SA &&    SB>Bid &&
        BID==1&&    Bid<K &&   Bid<T &&    Bid<SA &&   Bid<SB
       )
 
niktron:

Ayuda, por favor.

Cada una de las variables puede tomar un valor de 1 a 5...Dime cómo no escribir 3125 opciones)))

Sortea 25 opciones y luego resuelve quién es mayor.
 
tara:
Dibuja 25 opciones y luego trata de ver quién es más grande.

Gracias... eso es lo que estoy haciendo ahora... quería hacerlo con arrays, pero no tengo la tracción...))
 
Al final hay 3125 opciones, no 25...pero dividirlo en 25 opciones también es una cosa)))
 
Escriba sus comentarios de inmediato, le ayudarán después.
 
Se fue con una mujer.
 

Por favor, ayuda con el indicador con archivos adjuntos ".mqh".

Los buffers indicadores ExtBuffer1[], ExtBuffer2[] y Buffer_M[] tienen tamaño 0. Al mismo tiempo el buffer ExtBuffer0[] funciona bien y su tamaño es igual a Bares, como debería ser. Lo más interesante es que funcionaba bien en la antigua versión de MT4 antes de actualizarla a la nueva. Una cosa más. Si muevo todos los elementos de un indicador al mismo archivo mq4 básico, todo vuelve a funcionar bien.

Pregunta: ¿Por qué los tamaños de las matrices de los búferes de los indicadores en los anexos se ponen a cero?

Aquí está el código fuente del indicador.

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

//| AO_EMA_(with_includes).mq4 |

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

#include <AO_EMA_(with_includes)_GLOB.mqh>

//--------------------------------------------

int init()

{

#include <AO_EMA_(with_includes)_INIT.mqh>

return(0);

}

//--------------------------------------------

int start()

{

#include <AO_EMA_(with_includes)_START.mqh>

return(0);

}

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





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

//| AO_EMA_(with_includes)_GLOB.mq4 |

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

#property indicator_separate_window

#property indicator_buffers 4

#property indicator_color1 Black

#property indicator_color2 Green

#property indicator_color3 Red


//---- Input Data

extern int Slow = 100;

extern double Slow_Fast = 4.318;

extern int Average = 25; // Усреднение АО

extern bool Show_AO_G = true,

Show_AO_R = true;


//---- Глобальные переменные

int Fast;

bool Alert_done = false; // Флаг говорит о том, что Alert уже был раз сгенерирован.

//---- indicator buffers

double ExtBuffer0[];

double ExtBuffer1[];

double ExtBuffer2[];

//---- Буфера индикатора, для промежуточных расчетов

double Buffer_M[];

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

//| AO_EMA_(with_includes)_INIT.mq4 |

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

//---- Установка значение для переменной "Fast"

Fast = NormalizeDouble(Slow / Slow_Fast, 0);


//---- indicator buffers mapping

SetIndexBuffer(0, ExtBuffer0);

SetIndexBuffer(1, ExtBuffer1);

SetIndexBuffer(2, ExtBuffer2);

SetIndexBuffer(3, Buffer_M);


//---- drawing settings

SetIndexStyle(0, DRAW_NONE); // Линия не рисуется

SetIndexStyle(1, DRAW_HISTOGRAM); // Гистограмма

SetIndexStyle(2, DRAW_HISTOGRAM); // Гистограмма

SetIndexStyle(3, DRAW_NONE); // Линия не рисуется

//---- drawing begin settings

SetIndexDrawBegin(0, Fast); // Индикатор начинает рисоваться с этого бара, от начала графика слева.

SetIndexDrawBegin(1, Fast);

SetIndexDrawBegin(2, Slow);

SetIndexDrawBegin(3, Slow);


IndicatorDigits(Digits+1);

//---- name for DataWindow and indicator subwindow label

IndicatorShortName("AO_EMA ("+Fast+"-"+Slow+")");

SetIndexLabel(1,"Green");

SetIndexLabel(2,"Red");

//---- Обнуляем буфер индикатора

SetIndexEmptyValue(0, 0.0); SetIndexEmptyValue(1, 0.0);

SetIndexEmptyValue(2, 0.0); SetIndexEmptyValue(3, 0.0);

//---- initialization done

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

//| AO_EMA_(with_includes)_START.mq4 |

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

int limit, pos;

int counted_bars=IndicatorCounted();

double prev,current, pr;

bool up;


//---- Последний посчитанный бар будет пересчитан

if(counted_bars>0) counted_bars--;

limit=Bars-counted_bars;

Print("counted_bars=",counted_bars," Bars=",Bars," limit=",limit);

Print("0=",ArraySize(ExtBuffer0)," 1=",ArraySize(ExtBuffer1)," 2=",ArraySize(ExtBuffer2)," M=",ArraySize(Buffer_M));


//---- Расчет MACD для Гистограммы "= EMA(fast) - EMA(slow)"

if(Show_AO_G == true || Show_AO_R == true)

{ for(int i=0; i<limit; i++)

Buffer_M[i]=iMA(NULL,0,Fast,0,MODE_EMA,PRICE_MEDIAN,i)-iMA(NULL,0,Slow,0,MODE_EMA,PRICE_MEDIAN,i);


//---- Усредняем MACD по "Average".Это и будет рисоваться на графике..

//---- ... можно заменить на " EMA(Fast)".

pr=2.0/(Average+1);

pos=Bars-2;

if(counted_bars>2) pos=Bars-counted_bars-1;

//---- Основной расчет

while(pos>=0)

{ if(pos==Bars-2) ExtBuffer0[pos+1]=Buffer_M[pos+1];

ExtBuffer0[pos]=Buffer_M[pos]*pr+ExtBuffer0[pos+1]*(1-pr);

pos--; }

//---- Расперделение данных между 2-я буферами, для разделения по цветам

for(i=limit-1; i>=0; i--)

{ // При перерасчете самого левого бара, порядковый номер в массиве [i+1] выходит за пределы размера массива, поэтому расчет первого цикла прорускаем.

if(i == Bars-1) continue;

//------------------------------------

current = ExtBuffer0[i];

prev = ExtBuffer0[i+1];

if(current == prev) continue;

else

{ if(current>prev) up=true;

if(current<prev) up=false;

if(!up)

{ ExtBuffer2[i]=current;

ExtBuffer1[i]=0.0; }

else

{ ExtBuffer1[i]=current;

ExtBuffer2[i]=0.0; }

}}}

//--- Устанавливаем видимость индикаторов

if(Show_AO_G == false) SetIndexStyle(1, DRAW_NONE);

if(Show_AO_R == false) SetIndexStyle(2, DRAW_NONE);

 
NEP:

Por favor, ayuda con el indicador con archivos adjuntos ".mqh".

Los buffers indicadores ExtBuffer1[], ExtBuffer2[] y Buffer_M[] tienen tamaño 0. Al mismo tiempo el buffer ExtBuffer0[] funciona bien y su tamaño es igual a Bares, como debería ser. Lo más interesante es que funcionaba bien en la antigua versión de MT4 antes de actualizarla a la nueva. Una cosa más. Si muevo todos los elementos de un indicador al mismo archivo mq4 básico, todo vuelve a funcionar bien.

Pregunta: ¿Por qué los tamaños de las matrices de los búferes de los indicadores en los anexos se ponen a cero?

Aquí está el código fuente del indicador.




¿Te gusta hacer cosas por el culo?