Ajuda na codificação - página 784

 

Realmente amo este indicador mas é ligeiramente repintado, preciso de ajuda para corrigi-lo, por favor

Foi capaz de usar este indicador para gerar este resultado (https://www.forexfactory.com/siglot/199244), trocando-o manualmente (bastante estressante) com meu sistema que estou disposto a compartilhar uma vez que seja capaz de automatizar este indicador no sistema sem que ele repinte


//+------------------------------------------------------------------+
//|                                                  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:


Não dobrar/triplicar/quadruplicar posto!

Eu apaguei seus postos duplicados.

 

Olá. Alguém poderia me ajudar a colocar ordens de compra e venda quando as setas aparecem na tabela? Estou usando setas do indicador de explosão WADDAH atr. qualquer ajuda seria ótima. Obrigado

<ex4 arquivo eliminado>

 
Olá você pode me ajudar. sobre como posso adicionar design no meu modelo de gráfico e mostrar isto como a imagem anexada, e como posso adicionar limiar como parar a negociação quando determinada quantia é atingida ou o saldo da conta é atingida a x quantia...anexado é meu código e por favor sinta-se livre para adicionar mais e modificar...
Arquivos anexados:
Capture.JPG  128 kb
 
Eustorgio Trentino:
Olá você pode me ajudar. sobre como posso adicionar design no meu modelo de gráfico e mostrar isto como a imagem anexada, e como posso adicionar limiar como parar a negociação quando determinada quantia é atingida ou o saldo da conta é atingida a x quantia...anexado é meu código e por favor sinta-se livre para adicionar mais e modificar...

Não duplique/ triplique o correio!!

Eu apaguei suas duplicatas.

 
Os caras precisam de ajuda será possível fazer um back-teste no ano anterior, como de janeiro a dezembro de 2020? porque estou usando o MT4 e quando eu fizer um back-teste no ano anterior ele não vai funcionar
 
Eustorgio Trentino:
Os caras precisam de ajuda será possível fazer um back-teste no ano anterior, como de janeiro a dezembro de 2020? porque estou usando o MT4 e quando eu fizer um back-teste no ano anterior ele não vai funcionar

Desde que você tenha dados históricos suficientes para o símbolo, é claro que você pode.

 
Olá, olá a todos como estão ... Espero que tenham boa saúde nestes tempos difíceis

Existe a possibilidade de adicionar a opção de JMA Jurik média móvel??

Agradeço a um bom programador com um bom coração que pode me ajudar sem pedir remuneração em troca ... Agradeço antecipadamente, ... saudações a todos... Obrigado
...
... saudações
Arquivos anexados:
 
Obrigado a todos por estes exemplos.
 
ok