Ayuda a la codificación - página 784

 

Realmente me encanta este indicador, pero es ligeramente repinta, necesita ayuda para arreglarlo por favor

Fue capaz de utilizar este indicador para generar este resultado (https://www.forexfactory.com/siglot/199244) por el comercio manual (bastante estresante sin embargo) con mi sistema que estoy dispuesto a compartir una vez que soy capaz de automatizar este indicador en el sistema sin que repinta


//+------------------------------------------------------------------+
//|                                                  Entry Point.mq4 |
//|                                                                  |
//|                                                                  |
//| Volatility quality index originaly developed by                  |
//| Thomas Stridsman (August 2002 Active Trader Magazine)            |
//|                                                                  |
//| Price pre-smoothing and filter added by raff1410                 |
//+------------------------------------------------------------------+
#property copyright "mladen"
#property link      "mladenfx@gmail.com"

#property indicator_separate_window
#property indicator_minimum 0.0
#property indicator_maximum 100.0
#property indicator_buffers 5
#property indicator_color1 CLR_NONE
#property indicator_color2 CLR_NONE
#property indicator_color3 Lime
#property indicator_color4 Red
#property indicator_color5 CLR_NONE

extern int KPeriod = 21;
extern int DPeriod = 12;
extern int Slowing = 3;
extern int method = 0;
extern int price = 0;
extern string WPR = "";
extern int ExtWPRPeriod = 14;
extern double ZoneHighPer = 70.0;
extern double ZoneLowPer = 30.0;
extern bool Modeone = TRUE;
extern bool PlaySoundBuy = FALSE;
extern bool PlaySoundSell = FALSE;
int Grima = 0;
extern string FileSoundBuy = "analyze buy";
extern string FileSoundSell = "analyze sell";
double stasi[];
double Regio[];
double Ray[];
double Dalio[];
double Mekno[];
int Tekno = 0;
int Dupon = 0;
int Travel = 0;
int DTra = 0;
int AsTra = 0;
int xTra = 0;

int init() {

   IndicatorBuffers(5);
   SetIndexStyle(0, DRAW_LINE, EMPTY, 0);
   SetIndexBuffer(0, stasi);
   SetIndexStyle(1, DRAW_LINE, EMPTY, 0);
   SetIndexBuffer(1, Regio);
   SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 5);
   SetIndexArrow(2, 244);
   SetIndexBuffer(2, Ray);
   SetIndexStyle(3, DRAW_HISTOGRAM, STYLE_SOLID, 5);
   SetIndexBuffer(3, Dalio);
   SetIndexArrow(3, 244);
   SetIndexStyle(4, DRAW_LINE, EMPTY, 0);
   SetIndexBuffer(4, Mekno);
   Tekno = KPeriod + Slowing;
   Dupon = Tekno + DPeriod;
   SetIndexDrawBegin(0, Tekno);
   SetIndexDrawBegin(1, Dupon);
   SetIndexDrawBegin(4, ExtWPRPeriod);
   SetIndexEmptyValue(2, 0);
   SetIndexEmptyValue(3, 0);
   return (0);
}

int start() {
   double priceField;
   double highCal;
   double lowCal;
   double moov;
   double morz;
   double ore;
   double larzo;
   int shaft;
   int indiCount = IndicatorCounted();
   if (Bars <= Dupon) return (0);
   if (indiCount < 1) {
      for (int iterat0 = 1; iterat0 <= Tekno; iterat0++) stasi[Bars - iterat0] = 0;
      for (iterat0 = 1; iterat0 <= Dupon; iterat0++) Regio[Bars - iterat0] = 0;
   }
   if (indiCount > 0) indiCount--;
   int iterat1 = Bars - indiCount;
   for (iterat0 = 0; iterat0 < iterat1; iterat0++) {
      stasi[iterat0] = iStochastic(NULL, 0, KPeriod, DPeriod, Slowing, method, priceField, MODE_MAIN, iterat0);
      Regio[iterat0] = iStochastic(NULL, 0, 21, DPeriod, Slowing, method, priceField, MODE_SIGNAL, iterat0);
   }
   iterat0 = Bars - ExtWPRPeriod - 1;
   if (indiCount > ExtWPRPeriod) iterat0 = Bars - indiCount - 1;
   while (iterat0 >= 0) {
      highCal = High[iHighest(NULL, 0, MODE_HIGH, ExtWPRPeriod, iterat0)];
      lowCal = Low[iLowest(NULL, 0, MODE_LOW, ExtWPRPeriod, iterat0)];
      if (!Bhat(highCal - lowCal, 0.0)) Mekno[iterat0] = (highCal - Close[iterat0]) / (-0.01) / (highCal - lowCal) + 100.0;
      iterat0--;
   }
   if (indiCount > 0) indiCount--;
   iterat1 = Bars - indiCount;
   for (iterat0 = iterat1 - 1; iterat0 >= 0; iterat0--) {
      moov = Regio[iterat0];
      morz = Regio[iterat0 + 1];
      ore = stasi[iterat0];
      larzo = stasi[iterat0 + 1];
      if (ore > moov && larzo < morz && larzo < ZoneLowPer && morz < ZoneLowPer) {
         Ray[iterat0] = 100;
         shaft = iBarShift(NULL, 0, DTra);
         if (Modeone && shaft != iterat0 && xTra == 1) Ray[shaft] = 0;
         DTra = Time[iterat0];
         xTra = 1;
      } else Ray[iterat0] = 0;
      if (ore < moov && larzo > morz && larzo > ZoneHighPer && morz > ZoneHighPer) {
         Dalio[iterat0] = 100;
         shaft = iBarShift(NULL, 0, AsTra);
         if (Modeone && shaft != iterat0 && xTra == -1) Dalio[shaft] = 0;
         AsTra = Time[iterat0];
         xTra = -1;
      } else Dalio[iterat0] = 0;
   }
   if (PlaySoundBuy && Ray[Grima] > 0.0) {
      if (Travel != Time[Grima]) PlaySound(FileSoundBuy);
      Travel = Time[Grima];
   }
   if (PlaySoundSell && Dalio[Grima] > 0.0) {
      if (Travel != Time[Grima]) PlaySound(FileSoundSell);
      Travel = Time[Grima];
   }
   return (0);
}

bool Bhat(double Atat0, double Atat1) {
   bool Modenine = NormalizeDouble(Atat0 - Atat1, 8) == 0.0;
   return (Modenine);
}
 
Mayowa Daniel Sonaike:


No publiques dos/tres/cuatro veces.

He borrado tus mensajes duplicados.

 

Hola. ¿Alguien podría ayudarme a colocar órdenes de compra y venta cuando aparecen flechas en el gráfico? Estoy usando las flechas del indicador WADDAH atr explosion. cualquier ayuda seria genial. Gracias

<archivo ex4 borrado>

 
Hola puede ayudarme. en cómo puedo añadir el diseño en mi plantilla de gráfico y mostrar esto como la imagen adjunta, y cómo puedo añadir umbral como detener el comercio cuando cierta cantidad se alcanza o el saldo de la cuenta es llegar a x cantidad..adjunto es mi código y por favor no dude en añadir más y modificar.
Archivos adjuntos:
Capture.JPG  128 kb
 
Eustorgio Trentino:
Hola puede ayudarme. en cómo puedo añadir el diseño en mi plantilla de gráfico y mostrar esto como la imagen adjunta, y cómo puedo añadir umbral como detener el comercio cuando cierta cantidad se alcanza o el saldo de la cuenta es llegar a x amount..attached es mi código y por favor no dude en añadir más y modificar..

¡¡No hagas doble/triple post!!

He borrado tus duplicados.

 
Chicos necesito ayuda ¿será posible hacer un backtest del año anterior como de enero 2020 - diciembre 2020? porque estoy usando MT4 y cuando hago el backtest anterior no funciona
 
Eustorgio Trentino:
Chicos, necesito ayuda, ¿será posible hacer un back-test del año anterior, como por ejemplo de enero a diciembre de 2020?

Siempre que tengas suficientes datos del historial del símbolo, por supuesto que puedes.

 
Hola , Hola a todos como están... Espero que tengan buena salud en estos tiempos difíciles

¿Hay la posibilidad de añadir la opción de JMA Jurik media móvil?

Agradezco a un buen programador con un buen corazón me puede ayudar sin pedir una remuneración a cambio ... Les agradezco de antemano , ... saludos a todos ... Gracias

.. saludos
Archivos adjuntos:
 
Gracias a todos por estos ejemplos.
 
ok
Razón de la queja: