2 Attachment (s) eu estou tentando filtrar alguns sinais encontrados ATR um pouco para muito visitado
teve uma ideia simples para comparar
(alta-baixa)fechar * 1000
Eu modifiquei um código, mas não estava funcionando bem ...
há um bug no fim de semana; obter dados falsos ...
pls ajuda ....
(se vc pode considerar adicionar mais alguma funcionalidade ma nível de alerta ..)
obrigado
***************************
// ----------------------------------------------- -------------------
//| Intervalo em% .mq4 |
//| |
//| |
// ----------------------------------------------- -------------------
#property copyright free
#property link free
#property indior_separate_window
#property indior_buffers 1
#property indior_color1 DodgerBlue
//---- parâmetros de entrada
extern int AtrPeriod = 1;
//---- buffers
AtrBuffer duplo [];
TempBuffer duplo [];
// ----------------------------------------------- -------------------
//| Função de inicialização interna personalizada |
// ----------------------------------------------- -------------------
int init ()
{
string short_name;
//---- 1 buffer adicional usado para contagem.
IndiorBuffers (2);
//---- linha interna
SetIndexStyle (0, DRAW_HISTOGRAM);
SetIndexBuffer (0, AtrBuffer);
SetIndexBuffer (1, TempBuffer);
//---- nome para DataWindow e rótulo interno de subjanela
short_name = intervalo em% AtrPeriod );
IndiorShortName (short_name);
SetIndexLabel (0, short_name);
//----
SetIndexDrawBegin (0, AtrPeriod);
//----
retorno (0);
}
// ----------------------------------------------- -------------------
//| Média True Range |
// ----------------------------------------------- -------------------
int start ()
{
int i, counted_bars = IndiorCounted ();
//----
if (Barslt; = AtrPeriod) retorna (0);
//- zero inicial
if (counted_barslt; 1)
para (i = 1; ilt; = AtrPeriod; i ) AtrBuffer [Barras-i] = 0,0;
//----
i = Bars-counted_bars-1;
while (igt; = 0)
{
duplo alto = Alto [i];
double low = baixo [i];
if (i == Bars-1) TempBuffer [i] = alto-baixo;
outro
{
duplo prevclose = Fechar [i 1];
TempBuffer [i] = (MathMax (alta, prevclose) -MatMin (baixa, prevclose))Close [i 1] * 1000;
}
Eu--;
}
//----
if (counted_barsgt; 0) counted_bars--;
int limit = Bars-counted_bars;
para (i = 0; ilt; limite; i )
AtrBuffer [i] = iMAOnArray (TempBuffer, Barras, AtrPeriod, 0, MODE_SMA, i);
//----
retorno (0);
}
// ----------------------------------------------- -------------------
https://www.tradingintuitivo.com/att...0571487221.mq4
https://www.tradingintuitivo.com/tra...-training.html