sodapdf-converted.pdf
- 1. //=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| CHAVE SEGURANÇA TRAVA MENSAL PRO CLIENTE |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
//demo DATA DA EXPIRAÇÃO // demo DATA DA EXPIRAÇÃO
bool use_demo= FALSE; // FALSE // TRUE // TRUE ATIVA / FALSE DESATIVA
EXPIRAÇÃO
string ExpiryDate= "30/10/20100"; // DATA DA EXPIRAÇÃO
string expir_msg="TaurusEstrategias Expirado ? Suporte Pelo Telegram
@IndicadoresTaurus !!!"; // MENSAGEM DE AVISO QUANDO EXPIRAR
//=====================================================================
======================================================================
=================
//NÚMERO DA CONTA MT4 // NÚMERO DA CONTA MT4
bool use_acc_number= FALSE ; // TRUE // TRUE // TRUE ATIVA / FALSE DESATIVA
NÚMERO DE CONTA
long acc_number= 500540333; // NÚMERO DA CONTA
string acc_numb_msg="TaurusEstrategias não autorizado pra essa, conta !!!"; //
MENSAGEM DE AVISO NÚMERO DE CONTA INVÁLIDO
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| TAURUS SNIPER |
//| CRIADOR> IVONALDO FARIAS |
//| CONTATO INSTRAGAM>> @IVONALDO FARIAS |
//| CONTATO WHATSAPP 21 97278-2759 |
//| TELEGRAM E O MESMO NUMERO ACIMA |
//| INDICADOR TAURUS 2022 |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
#property copyright "TaurusEstrategias.O.B"
#property description "Atualizado no dia 20/10/2022"
#property link "https://t.me/IndicadoresTaurus"
#property description "Programado por Ivonaldo Farias !!!"
#property description "===================================="
#property description "Contato WhatsApp => +55 84 8103‑3879"
#property description "===================================="
#property description "Suporte Pelo Telegram @IndicadoresTaurus"
#property description "===================================="
#property strict
- 2. //#property icon "Imagesfavicon.ico"
//=====================================================================
======================================================================
=================
#property indicator_chart_window
#property indicator_buffers 20
#property indicator_color1 clrWhiteSmoke
#property indicator_color2 clrWhiteSmoke
#property indicator_color3 clrYellow
#property indicator_color4 clrYellow
#property indicator_color5 clrLime
#property indicator_color6 clrRed
#property indicator_color12 clrRed
#property indicator_color13 clrRed
//=====================================================================
======================================================================
=================
#define KEY_DELETE 46
#define READURL_BUFFER_SIZE 100
#define INTERNET_FLAG_NO_CACHE_WRITE 0x04000000
//=====================================================================
======================================================================
=================
#include <WinUser32.mqh>
//=====================================================================
======================================================================
=================
struct backtest
{
double win;
double loss;
double draw;
int consecutive_wins;
int consecutive_losses;
int count_win;
int count_loss;
int count_entries;
backtest()
{
Reset();
}
void Reset()
{
win=0;
loss=0;
draw=0;
consecutive_wins=0;
consecutive_losses=0;
- 4. NA_MESMA_VELA, //Na mesma vela
NA_PROXIMA_VELA //Na próxima vela
};
//=====================================================================
======================================================================
=================
//---- Parâmetros de entrada - MX2
//DONO IVONALDO COPY
enum sinal
{
MESMA_VELA = 0, //LIBERA COPY
PROXIMA_VELA = 1 //LIBERA COPY
};
//=====================================================================
======================================================================
=================
//---- Parâmetros de entrada - MX2
//CLIENTES PROIBIDO COPY
//enum sinal
// {
// MESMA_VELA = 3, //PROIBIDO COPY
// PROXIMA_VELA = 4 //PROIBIDO COPY
// };
//=====================================================================
======================================================================
=================
enum tipoexpericao
{
tempo_fixo = 0, //Tempo fixo
retracao = 1 //Retração na mesma vela
};
enum brokerm {
IQOPTION = 0, //IQ OPTION
BINOMO = 1, //BINOMO
QUOTEX = 2, // QUOTEX
BINARY = 3, //BINARY
OLYMP = 4, //OLYMP
TODAS = 5,// TODAS
};
//=====================================================================
=================================================
//--- Importa a Lib
#import "MambaLib2.1.ex4"
bool mambabot(string ativo , string sentidoseta , int timeframe , string NomedoSina,int
segundos, int corretoramamba);
#import
- 5. //=====================================================================
======================================================================
=================
#import "Telegram4Mql.dll"
string TelegramSendText(string ApiKey, string ChatId, string ChatText);
string TelegramSendTextAsync(string apiKey, string chatId, string chatText);
string TelegramSendPhotoAsync(string apiKey, string chatId, string filePath, string caption =
"");
#import
//=====================================================================
======================================================================
=================
#import "MX2Trading_library.ex4"
bool mx2trading(string par, string direcao, int expiracao, string sinalNome, int Signaltipo, int
TipoExpiracao, string TimeFrame, string mID, string Corretora);
#import
//=====================================================================
======================================================================
=================
#import "PriceProLib.ex4"
void TradePricePro(string ativo, string direcao, int expiracao, string nomedosinal, int
martingales, int martingale_em, int data_atual, int corretora);
#import
//=====================================================================
======================================================================
=================
#import "Kernel32.dll"
bool GetVolumeInformationW(string,string,uint,uint&[],uint,uint,string,uint);
#import
//=====================================================================
======================================================================
=================
#import "user32.dll"
int PostMessageW(int hWnd,int Msg,int wParam,int lParam);
int RegisterWindowMessageW(string lpString);
#import
//=====================================================================
======================================================================
=================
#import "Wininet.dll"
int InternetOpenW(string, int, string, string, int);
int InternetConnectW(int, string, int, string, string, int, int, int);
int HttpOpenRequestW(int, string, string, int, string, int, string, int);
int InternetOpenUrlW(int, string, string, int, int, int);
int InternetReadFile(int, uchar & arr[], int, int& OneInt[]);
int InternetCloseHandle(int);
#import
- 6. //=====================================================================
======================================================================
=================
#define CALL 1
#define PUT -1
#define EXAMPLE_PHOTO
"C:UsersUsuarioAppDataRoamingMetaQuotesTerminal9D15457EC01AD10E06A9
32AAC616DC32MQL4Filesexemplo.jpg"
//=====================================================================
======================================================================
=================
enum Posicao
{
LadoDireito = 1, // Lado Esquerdo Acima ?
LadoEsquerdo = 3, // Lado Esquerdo Abaixo ?
LadoDireitoAbaixo = 4, // Lado Direito Acima ?
LadoEsquerdoAbaixo = 2 // Lado Direito Abaixo ?
};
//=====================================================================
======================================================================
=================
enum FiltroEma
{
EMA = 1, // EMA
SMMA = 2, // SMMA
LWMA = 3, // LWMA
LSMA = 4 // LSMA SMA
};
//=====================================================================
======================================================================
=================
enum zooom
{
zoom1 = 2, // Escala De Zoom 1 Modo Distante
zoom2 = 3, // Escala De Zoom 2 Modo
zoom3 = 4 // Escala De Zoom 3
};
//=====================================================================
======================================================================
=================
enum signaltype
{
IntraBar = 0, //Intrabar
ClosedCandle = 1 //On new bar
};
enum tipofechamento{
FIM_DA_VELA = 0,// FIM DA VELA
TEMPO_CORRIDO = 1,// TEMPO CORRIDO
- 7. TEMPO_FIXO = 2, //TEMPO FIXO
};
//=====================================================================
======================================================================
=================
datetime timet;
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________MODOOPERACIONAL___________________ = "========
Definição do usuário!
======================================================================
===========";//=========================================================
========================";
input int Velas = 288; //Catalogação Por Velas Do backtest ?
input Posicao painel = LadoDireito; //Posição do painel ?
input int Intervalo = 2; //Intervalo Entre Ordens ?
input double assertividade_min = 70; //Assertividade (Trade Automático) ?
int value_chart_maxima = 6; //Value Chart - Máxima ?
int value_chart_minima =-6; //Value Chart - Mínima ?
int min_size_donforex = 20; //Min. Rectangle Size ?
input int MaxDelay = 5; //Delay Máximo Do Sinal - 0 = Desativar ?
input zooom Zoom = zoom2; //Escala De Zoom Modo Tela Ajuste ?
input bool AlertsMessage = false; //Alerta Sonoro Notificações ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _____________ROBOS____________________ = "========= Conectores
Interno!
======================================================================
===========";//=========================================================
========================";
input bool ativar_mx2 = false; //Automatizar com MX2 TRADING ?
input bool ativar_pricepro = false; //Automatizar com PRICEPRO ?
input bool ativar_TOPWIN = false; //Automatizar com TopWin ?
input bool ativar_mamba = true; //Automatizar com Mamba ?
- 8. extern brokerm Corretora = TODAS; //Escolher corretora(Apenas para Mamba)
input tipofechamento Fechamento = FIM_DA_VELA; //Tipo de Fechamento do Trade
input int expiracao_s = 15;// Se tempo fixo,defina os segundos do trade (PARA BINARY E
OLYMP)
input int expiracao_m = 1; // Se tempo fixo,defina os minutos do trade (PARA IQ OPTION,
BINOMO E QUOTEX)
input string NomeDoSinal = ""; //Nome do Sinal para os Robos (Opcional)
string SignalName = "SNIPER X"+NomeDoSinal; //Nome do Sinal para MT2
(Opcional)
extern int expiraca_mx2 = 0; //Tempo de Expiração em Minuto (0-Auto)
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________MODOATIVAR___________________ = "=====>> Iniciar
Operações Conf!
<<====================================================================
===========";//=========================================================
========================";
input bool atualizar_conf = false; //Habilitar inteligência artificial ?
input bool FiltroDeNoticias = false; //Habilitar Filtro De Noticias ?
input bool Condicao_Oposta = false; //Ativar Condição Oposta ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________ANÁLISE___________________ = "========= Filtro De
Tendencia!
======================================================================
==========";//==========================================================
=======================";
input bool FiltroDeTendência = false; //Habilitar Filtro De Tendência ?
input int MAPeriod=60; // Periodo Da EMA No Grafico ?
input FiltroEma MAType = LWMA; // Desvio Da EMA Disponiveis ?
//=====================================================================
======================================================================
=================
- 9. input string _________ANÁLISE1___________________ =
"=====================================================================
======================================";//==============================
===================================================";
input string ____________EATRATEGIAS___________________ = "=== CRIE SUA
ESTRATEGIA ABAIXO!
=================================================================";//=
CRIE SUA ESTRATEGIA ABAIXO
==================================================================";
input string _________ANÁLISE2___________________ =
"=====================================================================
=================================";//===================================
==============================================";
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________ANÁLISESR___________________ = "======== Suporte e
Resistência!
======================================================================
==========";//==========================================================
=======================";
input bool SeR = false; // Leitura Suporte e Resistência ?
input int MinSeR = 1; // Mínimo de linhas de Suporte e Resistência
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________VALUEAUTOMATICO___________________ = "=======
ValueChartAuto Ajuste!
======================================================================
==========";//==========================================================
=======================";
input bool value_chart = false; //Auto Ajuste na Sua Estrategia ?
- 10. //=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________FRACTAL___________________ = "======= Estrategia Fractal
Filtro!
======================================================================
==========";//==========================================================
=======================";
input bool Fractal = false; // Estrategia Fractal Velas ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________Harami___________________ = "======= Estrategia Harami Filtro!
======================================================================
==========";//==========================================================
=======================";
input bool Harami = false; // Estrategia Harami Velas ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________Pulback___________________ = "====== Estrategia Pulback Filtro!
======================================================================
==========";//==========================================================
=======================";
input bool Pulback_Enabled= false; // Estrategia Pulback ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
- 11. //+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________PRICEACTION___________________ = "====== Estrategia
PriceAction SR!
======================================================================
==========";//==========================================================
=======================";
input bool ativar_SR = false; // Estrategia PriceAction ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________DONFOREX___________________ = "====== Estrategia
DonForex SR!
======================================================================
==========";//==========================================================
=======================";
input bool ativar_donforex = false; // Estrategia DonForex ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________EXTREMO___________________ = "========= Estrategia
Extremo!
======================================================================
==========";//==========================================================
=======================";
input bool TaurusExtremo = false; // Estrategia Taurus Extremo ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
- 12. //=====================================================================
======================================================================
=================
input string _________VIRADA___________________ = "====== Estrategia Virada De
Hora!
======================================================================
==========";//==========================================================
=======================";
input bool ViradaDeHora = false; // Estrategia Virada De Hora ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________FLUXO___________________ = "========= Estrategia De Fluxo!
======================================================================
==========";//==========================================================
=======================";
input bool Fluxo = false; // Estrategia De Fluxo ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________VALUE___________________ = "====== Estrategia ValueChart
Conf!
======================================================================
==========";//==========================================================
=======================";
input bool HabilitarValueChart = false; // Habilitar Value Chart ?
int VC_Periodo = 0; // Numeros ?
input double VC_Overbough = 6.0; // Zonas De Venda Value Chart ?
input double VC_Oversolde =-6.0; // Zonas De Compra Value Chart ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
- 13. //=====================================================================
======================================================================
=================
input string _________OPERACIONALEMA___________________ = "=== Estrategia
Cruzamento de Médias!
======================================================================
==========";//==========================================================
=======================";
input bool AtivarCruzamento = false; //Cruzamento de Médias ?
input int FasterEMA = 1; // EMA Rápida ?
input int SlowerEMA = 5; // EMA Lenta ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONALRSI___________________ = "=========
Estrategia RSI Conf!
======================================================================
==========";//==========================================================
=======================";
input bool RSI1 = false; // Ativar RSI Operacional ?
input int RsiPeriodo = 2; // RSI Periodo ?
input ENUM_APPLIED_PRICE RsiPrice = PRICE_CLOSE; // Modulo De Entrada ?
input int VendaRsi = 80; // Zonas De Venda RSI ?
input int CompraRsi = 20; // Zonas De Compra RSI ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs CCI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONALCCI___________________ = "=========
Estrategia CCI Conf!
======================================================================
==========";//==========================================================
=======================";
input bool CCI = false; // Ativar CCI Operacional ?
input int CCIPeriodo = 14; // CCI Periodo ?
input ENUM_APPLIED_PRICE cciPrice = PRICE_CLOSE; // Modulo De Entrada ?
input int VendaCCI =-180; // Zonas De Venda CCI ?
- 14. input int CompraCCI = 180; // Zonas De Compra CCI ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONAL___________________ = "======= Estrategia
BANDAS Conf!
======================================================================
==========";//==========================================================
=======================";
input bool Bandas = false; // Ativar Bandas Operacional ?
input int BB_Period = 15; // Bandas Periodo ?
input int BB_Dev = 1; // Bandas Desvio ?
input int BB_Shift = 0; // Bandas Proxima Vela ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONALADX___________________ = "========
Estrategia ADX Conf!
======================================================================
==========";//==========================================================
=======================";
input bool Adx_Enabled = false; // Estrategia ADX ?
input int period_adx = 14; // Período
input ENUM_APPLIED_PRICE price_adx = PRICE_CLOSE; // Preço
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONALSTC___________________ = "===== Estrategia
Estocástico Filtro!
======================================================================
- 15. ==========";//==========================================================
=======================";
input bool SO_Enabled = false; //Estrategia Estocástico ?
ENUM_TIMEFRAMES STCTimeFrame = PERIOD_CURRENT; //TimeFrame
input int SO_KPeriod=5; //%K Período
input int SO_DPeriod=3; //%D Período
input int SO_Slowing=3; //Lento
ENUM_MA_METHOD SO_Mode=MODE_SMA;
ENUM_STO_PRICE SO_Price=STO_CLOSECLOSE;
input int SO_MAX=80; //Nível Máximo
input int SO_MIN=20; //Nível Mínimo
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONALRVI___________________ = "======== Estrategia
RVI Filtro!
======================================================================
==========";//==========================================================
=======================";
input bool EnabledRVI = false; //Estrategia RVI ?
input int PERIODORVI = 6; //PERIODO RVI ?
input int Linha = 1; //0 = Linha do RVI, 1 = Linha de sinal ?
input double MAXRVI = 0.1; //MAXIMA RVI ?
input double MINRVI = -0.1; //MINIMA RVI ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONALMFI___________________ = "======== Estrategia
MFI Filtro!
======================================================================
==========";//==========================================================
=======================";
input bool EnabledMFI = false; //Estrategia MFI ?
input int PERIODOMFI = 3; //PERIODO MFI ?
input ENUM_APPLIED_PRICE mfiPrice = PRICE_CLOSE; // Modulo De Entrada ?
input int MAXMFI = 95; //MAXIMA MFI ?
- 16. input int MINMFI = 5; //MINIMA MFI ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONALWPR___________________ = "========
Estrategia WPR Filtro!
======================================================================
==========";//==========================================================
=======================";
input bool EnabledWPR = false; //Estrategia WPR ?
input int PERIODOWPR = 1; //PERIODO WPR ?
input ENUM_APPLIED_PRICE wprPrice = PRICE_CLOSE; // Modulo De Entrada ?
input int MAXWPR = -95; //MAXIMA WPR ?
input int MINWPR = -5; //MINIMA WPR ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
input string _________OPERACIONALVELAS___________________ = "== Estrategia
Bloquea Velas Filtro!
======================================================================
==========";//==========================================================
=======================";
input bool Bloquea1 = false; //Bloquea entradas de velas mesma cor ?
input int quantidade = 3; //Quantidade de velas ?
int candlesup,candlesdn;
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONALPIPS___________________ = "======= Estrategia
De Velas Pips !
======================================================================
==========";//==========================================================
=======================";
- 17. //input string sessaox7899 ="Tamanho de Vela"; //Tamanho de Vela
input bool AtivarTamanhoVela = false; //Mínimo Pips ?
input int MinPips = 100; // Bloquear Vela Maior Que "XX" Pips ?
//input string sessaox7899 ="Tamanho de Vela"; //Tamanho de Vela
input bool AtivarTamanhoVela1 = false; //Maxímo Pips ?
input int maxPips = 10; // Bloquear Vela Menor Que "XX" Pips ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| VOLUE CHART vs RSI |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONAl___________________ = "==== Filtro Velas Contra
Tendência !
======================================================================
==========";//==========================================================
=======================";
input int TotalVelasMinimo = 0; //Mínimo de Velas contra? 0=Desabilita ?
input int TotalVelasMaximo = 99; //Máximo de Velas contra ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| INDICADOR_EXTERNO_1 |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string ___________INDICADOR_EXTERNO_1_____________= "============
COMBINER!
======================================================================
";
//=====================================================================
============";
input bool COMBINER1 = false; // Ativar este indicador?
input string IndicatorName1 = ""; // Nome do Indicador ?
input int IndiBufferCall1 = 0; // Buffer Call ?
input int IndiBufferPut1 = 1; // Buffer Put ?
signaltype SignalType1 = IntraBar; // Tipo de Entrada ?
ENUM_TIMEFRAMES ICT1TimeFrame1 = PERIOD_CURRENT; //TimeFrame ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
- 18. //| INDICADOR_EXTERNO_1 |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string ___________INDICADOR_EXTERNO_2_____________= "============
COMBINER!
======================================================================
";
//=====================================================================
============";
input bool COMBINER2 = false; // Ativar este indicador?
input string IndicatorName2 = ""; // Nome do Indicador ?
input int IndiBufferCall2 = 0; // Buffer Call ?
input int IndiBufferPut2 = 1; // Buffer Put ?
signaltype SignalType2 = IntraBar; // Tipo de Entrada ?
ENUM_TIMEFRAMES ICT1TimeFrame2 = PERIOD_CURRENT; //TimeFrame ?
//=====================================================================
======================================================================
=================
input string _________ANÁLISE3___________________ =
"=====================================================================
======================================";//==============================
===================================================";
input string ____________EATRATEGIA1___________________ = "======== SINAIS
TELEGRAM!
=================================================================";//===
== SINAIS TELEGRAM
==================================================================";
input string _________ANÁLISE4___________________ =
"=====================================================================
=================================";//===================================
==============================================";
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
- 19. input string _________OPERACIONAL5___________________ = "===== API resultados
No Telegram!
======================================================================
==========";//==========================================================
=======================";
input bool sinaltelegram = false; //Enviar Sinal No Telegram ?
input string nome_sala = ""; //Nome da Sala ?
input string apikey = ""; //API Key
input string chatid = ""; //Chat ID Telegram ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONAL4___________________ = "====== Obrigatório
Ativo ( EURUSD )
======================================================================
==========";//==========================================================
=======================";
input bool resultados_parciais_ao_vivo = false; //Exibir Resultados
Parciais ?
input string msg_personalizada_ao_vivo = ""; //Msg Personalizada ?
input int Parcial = 30; //Enviar Parcial a Cada (Minutos):
?
input int tempo_minutos_ao_vivo = 200; //Reiniciar Os Resultados
Em (Minutos): ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string _________OPERACIONAL1___________________ = "======== Estatísticas
Telegram!
======================================================================
==========";//==========================================================
=======================";
input bool assertividade_global = false; //Exibir Assertividade Global ?
input bool assertividade_restrita = false; //Exibir Assertividade Restrita ?
bool block_registros_duplicados = false; //Não Registrar Sinais Duplicados ?
string arquivo_estatisticas = "results.txt"; //Filename
- 20. //=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
input string __________OPERACIONAL___________________ = "===========
Telegram Conf!
======================================================================
==========";//==========================================================
=======================";
input bool ativar_win_gale = false; //Ativar Win MartinGale G1 ?
input bool ativar_win_gale2 = false; //Ativar Win MartinGale G2 ?
int tempo_expiracao = 0; //Expiracação em Minutos (0-TF) ?
input tipo Entrada = NA_PROXIMA_VELA; //Entrada Sinais Telegram ?
bool mostrar_taxa=false; //Mostrar Taxa? (MESMA VELA) ?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
string _________OPERACIONAL6___________________ = "============= Win/Loss!
======================================================================
==========";//==========================================================
=======================";
input string message_win = "Win De Primeira "; //Mensagem de Win ?
input string message_win_gale = "Win No Martingale "; //Mensagem de Win Gale ?
input string message_win_gale2 = "Win No Martingale "; //Mensagem de Win Gale2 ?
input string message_loss = "Loss "; //Mensagem de Loss ?
input string message_empate = "Empate "; //Mensagem de Empate ?
string file_win = EXAMPLE_PHOTO; //Imagem de Win ?
string file_win_gale = EXAMPLE_PHOTO; //Imagem de Win Gale ?
string file_win_gale2 = EXAMPLE_PHOTO; //Imagem de Win Gale 2 ?
string file_loss = EXAMPLE_PHOTO; //Imagem de Loss ?
//=====================================================================
======================================================================
=================
extern string _________TaurusEstrategias___________________ = "=======>>
TaurusEstrategias!
<<====================================================================
- 21. ==========";//==========================================================
=======================";
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
string ___________CONFIGURAÇÕES_GERAIS_____________= "=====
CONFIGURAÇÕES_GERAIS
======================================================================
";
//=====================================================================
============";
bool AlertsSound = false; //Alerta Sonoro?
string SoundFileUp = "alert2.wav"; //Som do alerta CALL
string SoundFileDown = "alert2.wav"; //Som do alerta PUT
string AlertEmailSubject = ""; //Assunto do E-mail (vazio = desabilita).
bool SendPushNotification = false; //Notificações por PUSH?
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| CONCTOR SIGNAL SETTINGS TOPWIN |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
string _____________TOP_WIN__________ = "===== CONFIGURAÇÕES TOP WIN
======================================================================
========================";
//=====================================================================
============";
string Nome_Sinal = SignalName; // Nome do Sinal (Opcional)
sinal Momento_Entrada = MESMA_VELA; // Vela de entrada
//=====================================================================
======================================================================
=================
// Variables
string diretorio = "HistoryEURUSD.txt";
string indicador = "";
string terminal_data_path = TerminalInfoString(TERMINAL_DATA_PATH);;
- 22. //=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| DEFINIÇÃO DOS TRADES |
//+------------------------------------------------------------------+
//=====================================================================
======================================================================
=================
sinal sinal_tipo_mx2 = MESMA_VELA; //Entrar na
tipoexpericao tipo_expiracao_mx2 = tempo_fixo; //Tipo Expiração
//=====================================================================
======================================================================
=================
backtest info, infog1, infog2;
melhor_nivel sets[];
melhor_nivel melhor_set;
string timeframe = "M"+IntegerToString(_Period);
string mID = IntegerToString(ChartID());
int SPC=5;
double rate=0;
//=====================================================================
======================================================================
=================
double PossibleBufferUp[], PossibleBufferDw[], BufferUp[], BufferDw[];
double ganhou[], perdeu[], empatou[];
//=====================================================================
======================================================================
=================
//Alertas
datetime TimeBarEntradaUp;
datetime TimeBarEntradaDn;
datetime TimeBarUp;
datetime TimeBarDn;
int Sig_Up0 = 0;
int Sig_Dn0 = 0;
int Sig_UpCall0 = 0;
int Sig_DnPut0 = 0;
int Sig_DnPut1 = 0;
datetime LastSignal;
//=====================================================================
======================================================================
=================
//----value
double vcHigh[];
double vcLow[];
double vcOpen[];
double vcClose[];
- 23. double Resistencia[];
double Suporte[];
int Taurus;
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double vcPut[];
double vcCall[];
//=====================================================================
======================================================================
=================
double VC_Overbought = 6;
double VC_Oversold = -6;
double VC_SlightlyOverbought = 11;
double VC_SlightlyOversold = -11;
int BarrasAnalise = 288;
int VC_Period = 0;
int VC_NumBars = 5;
//=====================================================================
======================================================================
=================
int MAMode;
string strMAType;
double MA_Cur, MA_Prev;
int PipFactor = 1;
//=====================================================================
======================================================================
=================
//Estrategia Taurus Extremo
int dist=20;
int hhb,llb;
//=====================================================================
======================================================================
=================
//Pulback
bool UseSMAFilter = false; //Média Móvel || Ativar/Desativar
int MA_Period = 20; // Período
int MA_Shift = 0; // MA Shift
ENUM_MA_METHOD MA_Method = MODE_SMMA; // Tipo de Média
ENUM_APPLIED_PRICE MA_Applied_Price = PRICE_CLOSE; //Aplicar A
int FilterShift = 1; // MA Filtro Shift
int PeriodoRSI_6 = 2;
int MaxRSI_6 = 50;
int MinRSI_6 = 50;
//=====================================================================
======================================================================
=================
bool first=true, nivel1=true, nivel2=false;
- 24. datetime data;
bool acesso_liberado=true;
datetime horario_expiracao[], horario_entrada[];
string horario_entrada_local[];
double entrada1[];
int tipo_entrada[];
string expiracao="", up="CALL", down="PUT",msg2="";
string orders_extreme="order_status.txt";
datetime befTime_rate, befTime_delay;
string filename_sinais_ao_vivo = arquivo_estatisticas; //Arquivo de Resultados
Parciais
int ratestotal, prevcalculated;
datetime desativar_sinais_horario;
bool first_filter=true;
bool LIBERAR_ACESSO=false;
string chave;
bool MelhorNivel = true;
static int largura_tela = 0, altura_tela = 0;
double LineBuffer[];
double val1, val2, i1;
bool trend,old;
double fasterEMAnow, slowerEMAnow, fasterEMAprevious, slowerEMAprevious,
fasterEMAafter, slowerEMAafter;
double b4plusdi, b4minusdi, nowplusdi, nowminusdi;
int up_so,dn_so;
string asset;
//string texto;
//=====================================================================
======================================================================
=================
//ATENÇÃO !!!
//CHAVE DE SEGURANÇA DO INDICADOR POR TRAVA CID NUNCA ESQUEÇA DE
ATIVA QUANDO POR EM TESTE AOS CLIENTES!!!!
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
bool AtivaChaveDeSeguranca = TRUE; // Ativa Chave De Segurança !!!!
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//CHAVE DE SEGURANÇA DO INDICADOR POR TRAVA CID NUNCA ESQUEÇA DE
ATIVA QUANDO POR EM TESTE AOS CLIENTES!!!!
//ATENÇÃO !!!
//=====================================================================
======================================================================
=================
int OnInit()
{
- 26. IndicatorBuffers(16);
//=====================================================================
======================================================================
=================
SetIndexStyle(0,DRAW_ARROW,NULL,0);
SetIndexArrow(0,233); //221 for up arrow
SetIndexBuffer(0,BufferUp);
SetIndexLabel(0,"CALL");
//=====================================================================
======================================================================
=================
SetIndexStyle(1,DRAW_ARROW,NULL,0);
SetIndexArrow(1,234); //222 for down arrow
SetIndexBuffer(1,BufferDw);
SetIndexLabel(1,"PUT");
//=====================================================================
======================================================================
=================
SetIndexStyle(2,DRAW_ARROW,NULL,1);
SetIndexArrow(2,118); //221 for up arrow
SetIndexBuffer(2,PossibleBufferUp);
SetIndexLabel(2,"PRE-ALERTA CALL");
//=====================================================================
======================================================================
=================
SetIndexStyle(3,DRAW_ARROW,NULL,1);
SetIndexArrow(3,118); //222 for down arrow
SetIndexBuffer(3,PossibleBufferDw);
SetIndexLabel(3,"PRE-ALERTA PUT");
//=====================================================================
======================================================================
=================
//--Statistics buffers
SetIndexStyle(4,DRAW_ARROW,NULL,2);
SetIndexArrow(4,254);
SetIndexBuffer(4,ganhou);
SetIndexLabel(4,"WIN");
//=====================================================================
======================================================================
=================
SetIndexStyle(5,DRAW_ARROW,NULL,2);
SetIndexArrow(5,253);
SetIndexBuffer(5,perdeu);
SetIndexLabel(5,"LOSS");
//=====================================================================
======================================================================
=================
SetIndexBuffer(6,empatou);
- 27. SetIndexLabel(6,"DRAW");
//=====================================================================
======================================================================
=================
//---value chart
SetIndexStyle(7, DRAW_NONE);
SetIndexStyle(8, DRAW_NONE);
SetIndexStyle(9, DRAW_NONE);
SetIndexStyle(10, DRAW_NONE);
//=====================================================================
======================================================================
=================
SetIndexBuffer(7, vcHigh);
SetIndexBuffer(8, vcLow);
SetIndexBuffer(9, vcOpen);
SetIndexBuffer(10, vcClose);
//=====================================================================
======================================================================
=================
SetIndexLabel(7,"vcHigh");
SetIndexLabel(8,"vcLow");
SetIndexLabel(9,"vcOpen");
SetIndexLabel(10,"vcClose");
//=====================================================================
======================================================================
=================
SetIndexEmptyValue(7, 0.0);
SetIndexEmptyValue(8, 0.0);
SetIndexEmptyValue(9, 0.0);
SetIndexEmptyValue(10, 0.0);
//=====================================================================
======================================================================
=================
//---value chart
SetIndexEmptyValue(0,EMPTY_VALUE);
SetIndexEmptyValue(1,EMPTY_VALUE);
SetIndexEmptyValue(2,EMPTY_VALUE);
SetIndexEmptyValue(3,EMPTY_VALUE);
SetIndexEmptyValue(4,EMPTY_VALUE);
SetIndexEmptyValue(5,EMPTY_VALUE);
SetIndexEmptyValue(6,EMPTY_VALUE);
//=====================================================================
======================================================================
================
SetIndexBuffer(11,ExtMapBuffer3);
SetIndexStyle(11,DRAW_LINE,STYLE_SOLID,0,clrGreen);
SetIndexLabel(11, "Linha Ema");
- 28. //=====================================================================
======================================================================
=================
SetIndexBuffer(12,ExtMapBuffer1);
SetIndexStyle(12,DRAW_LINE,STYLE_SOLID,0,clrNONE);
SetIndexLabel(12, "Linha Ema");
//=====================================================================
======================================================================
=================
SetIndexBuffer(13,ExtMapBuffer2);
SetIndexStyle(13,DRAW_LINE,STYLE_SOLID,0,clrNONE);
SetIndexLabel(13, "Linha Ema");
//=====================================================================
======================================================================
=================
SetIndexBuffer(14, Resistencia);
SetIndexStyle(14, DRAW_ARROW, STYLE_DOT, 0,clrNONE);
SetIndexArrow(14, 158);
SetIndexDrawBegin(14, Taurus - 0);
SetIndexLabel(14, "Resistencia");
//=====================================================================
======================================================================
=================
SetIndexBuffer(15, Suporte);
SetIndexArrow(15, 158);
SetIndexStyle(15, DRAW_ARROW, STYLE_DOT, 0,clrNONE);
SetIndexDrawBegin(15, Taurus - 0);
SetIndexLabel(15, "Suporte");
//=====================================================================
======================================================================
=================
//VC VOLUE CHART
SetIndexStyle(16, DRAW_ARROW, EMPTY, 0,clrNONE);
SetIndexBuffer(16, vcPut);
SetIndexEmptyValue(16, 0.0);
SetIndexStyle(17, DRAW_ARROW, EMPTY, 0,clrNONE);
SetIndexEmptyValue(17, 0.0);
SetIndexBuffer(17, vcCall);
//=====================================================================
======================================================================
=================
SetIndexStyle(18, DRAW_LINE, EMPTY, 0,clrNONE);
SetIndexBuffer(18,LineBuffer);
//=====================================================================
======================================================================
=================
IndicatorShortName("TaurusEstrategias");
ChartSetInteger(0,CHART_MODE,CHART_CANDLES);
- 29. ChartSetInteger(0,CHART_FOREGROUND,false);
ChartSetInteger(0,CHART_SHIFT,true);
ChartSetInteger(0,CHART_AUTOSCROLL,true);
ChartSetInteger(0,CHART_SCALEFIX,false);
ChartSetInteger(0,CHART_SCALEFIX_11,false);
ChartSetInteger(0,CHART_SCALE_PT_PER_BAR,true);
ChartSetInteger(0,CHART_SHOW_OHLC,false);
ChartSetInteger(0,CHART_SCALE,Zoom);
ChartSetInteger(0,CHART_SHOW_BID_LINE,true);
ChartSetInteger(0,CHART_SHOW_ASK_LINE,false);
ChartSetInteger(0,CHART_SHOW_LAST_LINE,false);
ChartSetInteger(0,CHART_SHOW_PERIOD_SEP,true);
ChartSetInteger(0,CHART_SHOW_GRID,false);
ChartSetInteger(0,CHART_SHOW_VOLUMES,false);
ChartSetInteger(0,CHART_SHOW_OBJECT_DESCR,false);
ChartSetInteger(0,CHART_COLOR_BACKGROUND,clrBlack);
ChartSetInteger(0,CHART_COLOR_FOREGROUND,clrWhiteSmoke);
ChartSetInteger(0,CHART_COLOR_CHART_UP,clrLime);
ChartSetInteger(0,CHART_COLOR_CHART_DOWN,clrMaroon);
ChartSetInteger(0,CHART_COLOR_CHART_LINE,clrGray);
ChartSetInteger(0,CHART_COLOR_CANDLE_BULL,clrLime);
ChartSetInteger(0,CHART_COLOR_CANDLE_BEAR,clrMaroon);
ChartSetInteger(0,CHART_COLOR_BID,clrIndigo);
ChartSetInteger(0,CHART_COLOR_ASK,clrIndigo);
ChartSetInteger(0,CHART_COLOR_LAST,clrIndigo);
ChartSetInteger(0,CHART_COLOR_STOP_LEVEL,clrIndigo);
ChartSetInteger(0,CHART_SHOW_TRADE_LEVELS,false);
ChartSetInteger(0,CHART_DRAG_TRADE_LEVELS,false);
ChartSetInteger(0,CHART_SHOW_DATE_SCALE,true);
ChartSetInteger(0,CHART_SHOW_PRICE_SCALE,true);
ChartSetInteger(0,CHART_SHOW_ONE_CLICK,false);
//=====================================================================
======================================================================
=================
switch(MAType)
{
case 1:
strMAType="EMA";
MAMode=MODE_EMA;
break;
case 2:
strMAType="SMMA";
MAMode=MODE_SMMA;
break;
case 3:
strMAType="LWMA";
MAMode=MODE_LWMA;
break;
- 30. case 4:
strMAType="LSMA";
break;
default:
strMAType="SMA";
MAMode=MODE_SMA;
break;
}
// Cater for fractional pips
if(Digits == 2 || Digits == 4)
PipFactor = 1;
if(Digits == 3 || Digits == 5)
PipFactor = 10;
if(Digits == 6)
PipFactor = 100;
if(Digits == 7)
PipFactor = 1000;
return(INIT_SUCCEEDED);
}
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void deinit()
{
ObjectsDeleteAll(0,OBJ_VLINE);
ObjectsDeleteAll(0,OBJ_LABEL);
if(acesso_liberado==false)
ChartIndicatorDelete(0,0,"TaurusEstrategias");
}
//=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
double calctam()
{
if(Digits<=3)
{return(0.001);}
else
if(Digits>=4)
{return(0.00001);}
else
- 32. //=====================================================================
======================================================================
=================
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
//=====================================================================
======================================================================
=================
if(TimeLocal()-10800 > StrToTime(ExpiryDate))
{
ChartIndicatorDelete(0,0,"TaurusEstrategias");
acesso_liberado=false;
}
//=====================================================================
======================================================================
=================
if(WindowExpertName()!="TaurusEstrategias")
{
Alert("Não mude o nome do indicador!");
ChartIndicatorDelete(0,0,"TaurusEstrategias");
}
//=====================================================================
======================================================================
=================
// RESULTADOS PARCIAL
static datetime befTime_aovivo=TimeLocal()-1900+Parcial*60; // 30 minutos
if(StringSubstr(Symbol(),0)=="EURUSD")
if(resultados_parciais_ao_vivo)
{
if(befTime_aovivo < TimeLocal()-1900)
{
estatisticas estatistica;
AtualizarEstatisticas(estatistica);
- 33. string resultado = msg_personalizada_ao_vivo+"nn";
resultado+=ExibirResultadoParcialAoVivo();
resultado+="nnWin -> "+IntegerToString(estatistica.win_global)+" | Loss - >
"+IntegerToString(estatistica.loss_global)+" ("+estatistica.assertividade_global_valor+")n";
TelegramSendTextAsync(apikey,chatid,resultado);
befTime_aovivo = TimeLocal()-1900+Parcial*60;
}
}
//=====================================================================
======================================================================
=================
//SEGURANCA CHAVE---//
if(!demo_f())
return(INIT_FAILED);
if(!acc_number_f())
return(INIT_FAILED);
//=====================================================================
======================================================================
=================
ratestotal=rates_total;
prevcalculated=prev_calculated;
//=====================================================================
======================================================================
=================
if(acesso_liberado)
{
static datetime befTime_signal, befTime_panel, befTime_check, befTime_telegram;
int limit = rates_total-prev_calculated > 0 ? 288 : 0;
if(!first && atualizar_conf && rate < assertividade_min &&
befTime_rate<iTime(NULL,0,0))
{
first=true;
nivel1=true;
nivel2=false;
value_chart_maxima=6;
value_chart_minima=-6;
min_size_donforex=20;
first_filter=true;
ArrayInitialize(PossibleBufferUp,EMPTY_VALUE);
ArrayInitialize(PossibleBufferDw,EMPTY_VALUE);
ArrayInitialize(BufferUp,EMPTY_VALUE);
ArrayInitialize(BufferDw,EMPTY_VALUE);
ArrayInitialize(ganhou,EMPTY_VALUE);
ArrayInitialize(perdeu,EMPTY_VALUE);
ArrayInitialize(empatou,EMPTY_VALUE);
ObjectsDeleteAll();
- 34. }
//=====================================================================
======================================================================
=================
if(!first)
{
if(ObjectFind(0,"carregando")!=-1)
{
limit=288;
ArrayInitialize(PossibleBufferUp,EMPTY_VALUE);
ArrayInitialize(PossibleBufferDw,EMPTY_VALUE);
ArrayInitialize(BufferUp,EMPTY_VALUE);
ArrayInitialize(BufferDw,EMPTY_VALUE);
ArrayInitialize(ganhou,EMPTY_VALUE);
ArrayInitialize(perdeu,EMPTY_VALUE);
ArrayInitialize(empatou,EMPTY_VALUE);
ObjectDelete("carregando");
}
//=====================================================================
======================================================================
=================
for(int i = limit; i >= 0; i--)
{
//=====================================================================
======================================================================
=================
if(FiltroDeNoticias)
{
double Noticias = iCustom(NULL,0,"ffcal2",0,0);
int EventMinute, EventImpact;
if((PossibleBufferUp[0] != 0 && PossibleBufferUp[0] != EMPTY_VALUE))
{
if((PossibleBufferDw[0] != 0 && PossibleBufferDw[0] != EMPTY_VALUE))
{
// 2 TOUROS
EventMinute = (int)iCustom(NULL,0,"ffcal2",0,0);
EventImpact = (int)iCustom(NULL,0,"ffcal2",1,0);
if(EventMinute <= 15 && EventImpact >= 2)
desativar_sinais_horario = iTime(NULL,PERIOD_M1,0)+(15+15)*60;
}
}
//=====================================================================
======================================================================
=================
- 35. if((PossibleBufferUp[0] != 0 && PossibleBufferUp[0] != EMPTY_VALUE))
{
if((PossibleBufferDw[0] != 0 && PossibleBufferDw[0] != EMPTY_VALUE))
{
// 3 TOUROS
EventMinute = (int)iCustom(NULL,0,"ffcal2",0,0);
EventImpact = (int)iCustom(NULL,0,"ffcal2",1,0);
if(EventMinute <= 25 && EventImpact >= 3)
desativar_sinais_horario = iTime(NULL,PERIOD_M1,0)+(25+25)*60;
}
}
}
//=====================================================================
======================================================================
=================
val1=
0.4360409450*Close[i+0]
+0.3658689069*Close[i+1]
+0.2460452079*Close[i+2]
+0.1104506886*Close[i+3]
-0.0054034585*Close[i+4]
-0.0760367731*Close[i+5]
-0.0933058722*Close[i+6]
-0.0670110374*Close[i+7]
-0.0190795053*Close[i+8]
+0.0259609206*Close[i+9]
+0.0502044896*Close[i+10]
+0.0477818607*Close[i+11]
+0.0249252327*Close[i+12]
-0.0047706151*Close[i+13]
-0.0272432537*Close[i+14]
-0.0338917071*Close[i+15]
-0.0244141482*Close[i+16]
-0.0055774838*Close[i+17]
+0.0128149838*Close[i+18]
+0.0226522218*Close[i+19]
+0.0208778257*Close[i+20]
+0.0100299086*Close[i+21]
-0.0036771622*Close[i+22]
-0.0136744850*Close[i+23]
-0.0160483392*Close[i+24]
-0.0108597376*Close[i+25]
-0.0016060704*Close[i+26]
+0.0069480557*Close[i+27]
+0.0110573605*Close[i+28]
+0.0095711419*Close[i+29]
+0.0040444064*Close[i+30]
- 37. +0.0005541115*Close[i+35+1]
+0.0007860160*Close[i+36+1]
+0.0130129076*Close[i+37+1]
+0.0040364019*Close[i+38+1];
//=====================================================================
======================================================================
=================
i1 = val1-val2;
if(i1>0)
trend=false;
if(i1<0)
trend=true;
//=====================================================================
======================================================================
=================
computes_value_charte(limit, VC_Period);
//=====================================================================
======================================================================
=================
fasterEMAnow = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_TYPICAL, i);
fasterEMAprevious = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_OPEN, i);
fasterEMAafter = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_TYPICAL, i);
//=====================================================================
===============================================================
slowerEMAnow = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_TYPICAL, i);
slowerEMAprevious = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_OPEN, i);
slowerEMAafter = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_TYPICAL, i);
//=====================================================================
======================================================================
=================
double RVI = iRVI(Symbol(),Period(),PERIODORVI,Linha,i+1);//0 = Linha do RVI, 1 =
Linha de sinal
double MFI = iMFI(Symbol(),Period(),PERIODOMFI,i+mfiPrice);
double WPR = iWPR(Symbol(),Period(),PERIODOWPR,i+wprPrice);
double r1 = iRSI(NULL,0,RsiPeriodo,RsiPrice,i+1);
double r2 = iRSI(NULL,0,RsiPeriodo,RsiPrice,i+0);
double cci = iCCI(NULL,0,CCIPeriodo,cciPrice,i);
double RSI_6 = iRSI(Symbol(),Period(),2,PRICE_CLOSE,i);
double MA =
iMA(NULL,PERIOD_CURRENT,MA_Period,MA_Shift,MA_Method,MA_Applied_Price,i+Filte
rShift);
double MA_1 =iMA(NULL,0,20,0,MODE_SMMA,PRICE_CLOSE,i);
hhb = iHighest(Symbol(),0,MODE_HIGH,dist,i+0);
- 38. llb = iLowest(Symbol(),0,MODE_LOW,dist,i+0);
b4plusdi = iADX(NULL, 0, period_adx, price_adx, MODE_PLUSDI,i);
nowplusdi = iADX(NULL, 0, period_adx, price_adx, MODE_PLUSDI,i+1);
b4minusdi = iADX(NULL, 0, period_adx, price_adx, MODE_MINUSDI,i);
nowminusdi = iADX(NULL, 0, period_adx, price_adx, MODE_MINUSDI,i+1);
//=====================================================================
======================================================================
=================
double ema1 = iMA(NULL, 0, 14, 1, MODE_EMA, PRICE_HIGH,i);
double ema2 = iMA(NULL, 0, 14, 1, MODE_EMA, PRICE_LOW,i);
double velas = (Open[i] + High[i] + Low[i] + Close[i]) / 4.0;
double fractal1 = iFractals(NULL, 0, MODE_UPPER, i);
if(fractal1 > 0.0 && velas > ema1)
Resistencia[i] = High[i];
else
Resistencia[i] = Resistencia[i+1];
double fractal2 = iFractals(NULL, 0, MODE_LOWER, i);
if(fractal2 > 0.0 && velas < ema2)
Suporte[i] = Low[i];
else
Suporte[i] = Suporte[i+1];
//=====================================================================
======================================================================
=================
double up1 = 0, dn1 = 0;
//=====================================================================
======================================================================
=================
// primeiro indicador
if(COMBINER1)
{
up1 = iCustom(NULL, ICT1TimeFrame1, IndicatorName1, IndiBufferCall1,
i+SignalType1);
dn1 = iCustom(NULL, ICT1TimeFrame1, IndicatorName1, IndiBufferPut1,
i+SignalType1);
up1 = sinal_buffer(up1);
dn1 = sinal_buffer(dn1);
}
else
{
up1 = true;
dn1 = true;
}
//=====================================================================
- 39. ======================================================================
=================
double up2 = 0, dn2 = 0;
//=====================================================================
======================================================================
=================
// primeiro indicador
if(COMBINER2)
{
up2 = iCustom(NULL, ICT1TimeFrame2, IndicatorName2, IndiBufferCall2,
i+SignalType2);
dn2 = iCustom(NULL, ICT1TimeFrame2, IndicatorName2, IndiBufferPut2,
i+SignalType2);
up2 = sinal_buffer(up2);
dn2 = sinal_buffer(dn2);
}
else
{
up2 = true; //
dn2 = true; //
}
//=====================================================================
===============================================================
if(SO_Enabled)
{
up_so = iStochastic(NULL, STCTimeFrame, SO_KPeriod, SO_DPeriod,
SO_Slowing, SO_Mode, SO_Price, MODE_SIGNAL, i) < SO_MIN;
dn_so = iStochastic(NULL, STCTimeFrame, SO_KPeriod, SO_DPeriod,
SO_Slowing, SO_Mode, SO_Price, MODE_SIGNAL, i) > SO_MAX;
}
else
{
up_so = true;
dn_so = true;
}
//=====================================================================
======================================================================
=================
candlesup=0;
candlesdn=0;
int j;
for(j = i+quantidade+1 ; j>=i; j--)
{
if(close[j+1]>=open[j+1]) // && close[j+2] > open[j+2])
- 40. candlesup++;
else
candlesup=0;
if(close[j+1]<=open[j+1]) // && close[j+2] < open[j+2])
candlesdn++;
else
candlesdn = 0;
}
//=====================================================================
======================================================================
=================
double maxima = iCustom(NULL,0,"ValueChart",0,i);
double minima = iCustom(NULL,0,"ValueChart",1,i);
//=====================================================================
======================================================================
=================
if(MAType==0)
{
MA_Cur=LSMA(MAPeriod,i);
MA_Prev=LSMA(MAPeriod,i+1);
}
else
{
MA_Cur=iMA(NULL,0,MAPeriod,0,MAMode,PRICE_CLOSE,i);
MA_Prev=iMA(NULL,0,MAPeriod,0,MAMode,PRICE_CLOSE,i+1);
}
//---- COLOR CODING
ExtMapBuffer3[i]=MA_Cur; //red
ExtMapBuffer2[i]=MA_Cur; //green
ExtMapBuffer1[i]=MA_Cur; //yello
//=====================================================================
======================================================================
=================
if(COMBINER1 || COMBINER1 || Fluxo || ViradaDeHora || Bloquea1 || EnabledWPR
|| EnabledMFI || EnabledRVI || value_chart || ativar_SR || ativar_donforex || Bandas || SeR ||
AtivarCruzamento || HabilitarValueChart || Condicao_Oposta || RSI1 || CCI || Fractal ||
FiltroDeTendência || AtivarTamanhoVela || AtivarTamanhoVela1 || Harami ||
Pulback_Enabled || Adx_Enabled || TaurusExtremo ||SO_Enabled)
{
if(iTime(NULL,PERIOD_M1,0)>desativar_sinais_horario
&&(!value_chart || vcLow[i]<=value_chart_minima) &&(!Condicao_Oposta ||
Close[i]<Open[i])//Leitira De Melhor Nivel
&&(!ativar_SR || high[i+0]>=Suporte[i+1]) &&(!ativar_SR ||
low[i+0]<=Suporte[i+1]) &&(!RSI1 || r1>CompraRsi) &&(!RSI1 || r2<CompraRsi)
- 41. &&(!ativar_donforex || DonForex(i, true)==true) &&(!FiltroDeTendência ||
MA_Prev < MA_Cur) && (!CCI || cci < VendaCCI)
&&(!Bandas ||
Close[i+0]<iBands(NULL,PERIOD_CURRENT,BB_Period,BB_Dev,BB_Shift,0,MODE_LOW
ER,i+0))
&&(!Bandas ||
Open[i+0]>iBands(NULL,PERIOD_CURRENT,BB_Period,BB_Dev,BB_Shift,0,MODE_LOW
ER,i+0))
&&(!Bandas ||
Open[i+1]>iBands(NULL,PERIOD_CURRENT,BB_Period,BB_Dev,BB_Shift,0,MODE_LOW
ER,i+1))
&&(!Bandas ||
Close[i+1]>iBands(NULL,PERIOD_CURRENT,BB_Period,BB_Dev,BB_Shift,0,MODE_LOW
ER,i+1))
&&(!SeR || horizontal(i, "up")) &&(!HabilitarValueChart ||
vcCall[i]<=VC_Oversolde) &&(!Fractal || (! trend==old && trend==true))
&&(!AtivarCruzamento || fasterEMAnow > slowerEMAnow)
&&(!AtivarCruzamento || fasterEMAprevious < slowerEMAprevious) &&(!AtivarCruzamento ||
fasterEMAafter > slowerEMAafter)
&&(!AtivarTamanhoVela || tamanhodevela(i)) &&(!AtivarTamanhoVela1 ||
tamanhodevela1(i)) &&(!SO_Enabled || up_so)
&&(!Harami || (Open [i+1] > Close [i+1])) &&(!Harami || (Open [i] < Close [i]))
&&(!Harami || (Close[i+1] < Open [i])) &&(!Harami || (Open [i+1] > Close [i]))
&&(!Pulback_Enabled || (RSI_6<=MinRSI_6 &&Padrao("call", i) &&
Close[i+FilterShift]>MA_1)) && (!Bloquea1 || candlesdn < quantidade)
&&(!Adx_Enabled || b4plusdi > b4minusdi) &&(!Adx_Enabled || nowplusdi <
nowminusdi) &&(!TaurusExtremo || (i==llb))
&&(!EnabledRVI || RVI<=MINRVI) &&(!EnabledMFI || MFI<=MINMFI)
&&(!EnabledWPR || WPR<=MINWPR)
&&(sequencia("call", i)) &&(sequencia_minima("call", i)) &&(!Fluxo || (i==hhb))&&
up1 && up2
&&(!ViradaDeHora || TimeMinute(Time[i])==59) &&(!ViradaDeHora ||
Padrao("call", i))
//=====================================================================
======================================================================
=================
&&PossibleBufferUp[i+1]==EMPTY_VALUE &&
PossibleBufferDw[i+1]==EMPTY_VALUE
&&BufferUp[i+1]==EMPTY_VALUE && BufferDw[i+1]==EMPTY_VALUE)
{
//=====================================================================
======================================================================
=================
if(Time[i] > LastSignal + (Period()*Intervalo)*60)
{
PossibleBufferUp[i] = iLow(_Symbol,PERIOD_CURRENT,i)-SPC*Point();
- 42. Sig_Up0=1;
}
}
else
{
PossibleBufferUp[i] = EMPTY_VALUE;
Sig_Up0=0;
}
}
//=====================================================================
======================================================================
=================
if(COMBINER1 || COMBINER1 || Fluxo || ViradaDeHora || Bloquea1 || EnabledWPR
|| EnabledMFI || EnabledRVI || value_chart || ativar_SR || ativar_donforex || Bandas || SeR ||
AtivarCruzamento || HabilitarValueChart || Condicao_Oposta || RSI1 || CCI || Fractal ||
FiltroDeTendência || AtivarTamanhoVela || AtivarTamanhoVela1 || Harami ||
Pulback_Enabled || Adx_Enabled || TaurusExtremo ||SO_Enabled)
{
//=====================================================================
======================================================================
=================
if(iTime(NULL,PERIOD_M1,0)>desativar_sinais_horario
&&(!value_chart || vcHigh[i]>=value_chart_maxima) &&(!Condicao_Oposta ||
Close[i]>Open[i])//Leitira De Melhor Nivel
&&(!ativar_SR || low[i+0]<=Resistencia[i+1]) &&(!ativar_SR ||
high[i+0]>=Resistencia[i+1]) &&(!RSI1 || r1<VendaRsi) &&(!RSI1 || r2>VendaRsi)
&&(!ativar_donforex || DonForex(i, false)==true) &&(!FiltroDeTendência ||
MA_Prev > MA_Cur) && (!CCI || cci > CompraCCI)
&&(!Bandas ||
Close[i+0]>iBands(NULL,PERIOD_CURRENT,BB_Period,BB_Dev,BB_Shift,0,MODE_UPP
ER,i+0))
&&(!Bandas ||
Open[i+0]<iBands(NULL,PERIOD_CURRENT,BB_Period,BB_Dev,BB_Shift,0,MODE_UPPE
R,i+0))
&&(!Bandas ||
Open[i+1]<iBands(NULL,PERIOD_CURRENT,BB_Period,BB_Dev,BB_Shift,0,MODE_UPPE
R,i+1))
&&(!Bandas ||
Close[i+1]<iBands(NULL,PERIOD_CURRENT,BB_Period,BB_Dev,BB_Shift,0,MODE_UPP
ER,i+1))
&&(!SeR || horizontal(i, "down")) &&(!HabilitarValueChart ||
vcPut[i]>=VC_Overbough) &&(!Fractal || (! trend==old && trend==false))
&&(!AtivarCruzamento || fasterEMAnow < slowerEMAnow)
&&(!AtivarCruzamento || fasterEMAprevious > slowerEMAprevious) &&(!AtivarCruzamento ||
fasterEMAafter < slowerEMAafter)
- 43. &&(!AtivarTamanhoVela || tamanhodevela(i)) &&(!AtivarTamanhoVela1 ||
tamanhodevela1(i)) &&(!SO_Enabled || dn_so)
&&(!Harami || (Open [i+1] < Close [i+1])) &&(!Harami || (Open [i] > Close [i]))
&&(!Harami || (Close[i+1] > Open [i])) &&(!Harami || (Open [i+1] < Close [i]))
&&(!Pulback_Enabled || (RSI_6>=MaxRSI_6 &&Padrao("put", i) &&
Close[i+FilterShift]<MA_1)) && (!Bloquea1 || candlesup < quantidade)
&&(!Adx_Enabled || b4plusdi < b4minusdi) &&(!Adx_Enabled || nowplusdi >
nowminusdi) &&(!TaurusExtremo || (i==hhb))
&&(!EnabledRVI || RVI>=MAXRVI) &&(!EnabledMFI || MFI>=MAXMFI)
&&(!EnabledWPR || WPR>=MAXWPR)
&&(sequencia("put", i)) &&(sequencia_minima("put", i))&&(!Fluxo || (i==llb))&&
dn1 && dn2
&&(!ViradaDeHora || TimeMinute(Time[i])==59) &&(!ViradaDeHora ||
Padrao("put", i))
//=====================================================================
======================================================================
=================
&&PossibleBufferUp[i+1]==EMPTY_VALUE &&
PossibleBufferDw[i+1]==EMPTY_VALUE
&&BufferUp[i+1]==EMPTY_VALUE && BufferDw[i+1]==EMPTY_VALUE)
{
//=====================================================================
======================================================================
=================
if(Time[i] > LastSignal + (Period()*Intervalo)*60)
{
PossibleBufferDw[i] = iHigh(_Symbol,PERIOD_CURRENT,i)+SPC*Point();
Sig_Dn0=1;
}
}
else
{
PossibleBufferDw[i] = EMPTY_VALUE;
Sig_Dn0=0;
}
} //PUT
//=====================================================================
======================================================================
=================
if(sinal_buffer(PossibleBufferUp[i+1]) && !sinal_buffer(BufferUp[i+1]))
{
LastSignal = Time[i];
BufferUp[i] = iLow(_Symbol,PERIOD_CURRENT,i)-SPC*Point();
Sig_UpCall0=1;
}
- 44. else
{
Sig_UpCall0=0;
}
//=====================================================================
======================================================================
=================
if(sinal_buffer(PossibleBufferDw[i+1]) && !sinal_buffer(BufferDw[i+1]))
{
LastSignal = Time[i];
BufferDw[i] = iHigh(_Symbol,PERIOD_CURRENT,i)+SPC*Point();
Sig_DnPut0=1;
}
else
{
Sig_DnPut0=0;
}
//=====================================================================
======================================================================
=================
old=trend;
LineBuffer[i] =0.0;
LineBuffer[0] =((0.4360409450 *Close[0])/200)+Bid;
LineBuffer[1] =((0.3658689069 *Close[1])/200)+Bid;
LineBuffer[2] =((0.2460452079 *Close[2])/200)+Bid;
LineBuffer[3] =((0.1104506886 *Close[3])/200)+Bid;
LineBuffer[4] =(((-0.0054034585)*Close[4])/200)+Bid;
LineBuffer[5] =(((-0.0760367731)*Close[5])/200)+Bid;
LineBuffer[6] =(((-0.0933058722)*Close[6])/200)+Bid;
LineBuffer[7] =(((-0.0670110374)*Close[7])/200)+Bid;
LineBuffer[8] =(((-0.0190795053)*Close[8])/200)+Bid;
LineBuffer[9] =((0.0259609206 *Close[9])/200)+Bid;
LineBuffer[10]=((0.0502044896 *Close[10])/200)+Bid;
LineBuffer[11]=((0.0477818607 *Close[11])/200)+Bid;
LineBuffer[12]=((0.0249252327 *Close[12])/200)+Bid;
LineBuffer[13]=(((-0.0047706151)*Close[13])/200)+Bid;
LineBuffer[14]=(((-0.0272432537)*Close[14])/200)+Bid;
LineBuffer[15]=(((-0.0338917071)*Close[15])/200)+Bid;
LineBuffer[16]=(((-0.0244141482)*Close[16])/200)+Bid;
LineBuffer[17]=(((-0.0055774838)*Close[17])/200)+Bid;
LineBuffer[18]=((0.0128149838 *Close[18])/200)+Bid;
LineBuffer[19]=((0.0226522218 *Close[19])/200)+Bid;
LineBuffer[20]=((0.0208778257 *Close[20])/200)+Bid;
LineBuffer[21]=((0.0100299086 *Close[21])/200)+Bid;
LineBuffer[22]=(((-0.0036771622)*Close[22])/200)+Bid;
LineBuffer[23]=(((-0.0136744850)*Close[23])/200)+Bid;
- 45. LineBuffer[24]=(((-0.0160483392)*Close[24])/200)+Bid;
LineBuffer[25]=(((-0.0108597376)*Close[25])/200)+Bid;
LineBuffer[26]=(((-0.0016060704)*Close[26])/200)+Bid;
LineBuffer[27]=((0.0069480557 *Close[27])/200)+Bid;
LineBuffer[28]=((0.0110573605 *Close[28])/200)+Bid;
LineBuffer[29]=((0.0095711419 *Close[29])/200)+Bid;
LineBuffer[30]=((0.0040444064 *Close[30])/200)+Bid;
LineBuffer[31]=(((-0.0023824623)*Close[31])/200)+Bid;
LineBuffer[32]=(((-0.0067093714)*Close[32])/200)+Bid;
LineBuffer[33]=(((-0.0072003400)*Close[33])/200)+Bid;
LineBuffer[34]=(((-0.0047717710)*Close[34])/200)+Bid;
LineBuffer[35]=((0.0005541115 *Close[35])/200)+Bid;
LineBuffer[36]=((0.0007860160 *Close[36])/200)+Bid;
LineBuffer[37]=((0.0130129076 *Close[37])/200)+Bid;
LineBuffer[38]=((0.0040364019 *Close[38])/200)+Bid;
//=====================================================================
======================================================================
=================
//---Check result
if((PossibleBufferUp[i]!=EMPTY_VALUE && i>1))
{
int v=i-1;
if(Close[v]>Open[v])
ganhou[v]=high[v]+SPC*_Point;
else
if(Close[v]<Open[v])
perdeu[v]=high[v]+SPC*_Point;
else
empatou[v]=high[v];
befTime_check=Time[0];
}
//=====================================================================
======================================================================
=================
else
if((PossibleBufferDw[i]!=EMPTY_VALUE && i>1))
{
int v=i-1;
if(Close[v]<Open[v])
ganhou[v]=low[v]-SPC*_Point;
else
if(Close[v]>Open[v])
perdeu[v]=low[v]-SPC*_Point;
- 46. else
if(Close[v]==Open[v])
empatou[v]=low[v];
befTime_check=Time[0];
}
//---Check result
//=====================================================================
======================================================================
=================
//---Send signal to Telegram
if(sinaltelegram==true && i==0 && !first && rate >= assertividade_min &&
TimeLocal()-1900 > LerArquivoDelay())
{
//=====================================================================
======================================================================
=================
if(PossibleBufferUp[i] != 0 && PossibleBufferUp[i] != EMPTY_VALUE &&
befTime_telegram != Time[0] //Entra Na Proxima Vela <==
&&(iTime(NULL,PERIOD_M1,0) > desativar_sinais_horario))
//=====================================================================
======================================================================
=================
{
ArrayResize(entrada1,ArraySize(entrada1)+1);
entrada1[ArraySize(entrada1)-1]=Close[0];
if(Entrada==NA_MESMA_VELA)
{
ArrayResize(horario_entrada,ArraySize(horario_entrada)+1);
horario_entrada[ArraySize(horario_entrada)-1]=iTime(Symbol(),_Period,0);
datetime time_final = iTime(Symbol(),_Period,0)+tempo_expiracao*60;
datetime horario_inicial = Offset(iTime(Symbol(),_Period,0),time_final);
int tempo_restante = TimeMinute(time_final)-TimeMinute(horario_inicial);
if(tempo_restante==1 && TimeSeconds(TimeLocal())>30)
{
ArrayResize(horario_expiracao,ArraySize(horario_expiracao)+1);
horario_expiracao[ArraySize(horario_expiracao)-
1]=iTime(Symbol(),_Period,0)+(tempo_expiracao*2)*60;
}
else
{
ArrayResize(horario_expiracao,ArraySize(horario_expiracao)+1);
- 47. horario_expiracao[ArraySize(horario_expiracao)-
1]=iTime(Symbol(),_Period,0)+tempo_expiracao*60;
}
}
else
{
datetime h_entrada=iTime(Symbol(),_Period,0)+_Period*60;
ArrayResize(horario_entrada,ArraySize(horario_entrada)+1);
horario_entrada[ArraySize(horario_entrada)-1]=h_entrada;
ArrayResize(horario_expiracao,ArraySize(horario_expiracao)+1);
horario_expiracao[ArraySize(horario_expiracao)-1] =
h_entrada+tempo_expiracao*60;
}
ArrayResize(tipo_entrada,ArraySize(tipo_entrada)+1);
tipo_entrada[ArraySize(tipo_entrada)-1]=CALL;
ArrayResize(horario_entrada_local,ArraySize(horario_entrada_local)+1);
horario_entrada_local[ArraySize(horario_entrada_local)-
1]=GetHoraMinutos(iTime(Symbol(),_Period,0));
datetime tempo = Entrada==NA_PROXIMA_VELA ? iTime(Symbol(),_Period,0) :
iTime(Symbol(),PERIOD_M1,0);
estatisticas estatistica;
if(assertividade_global==true || assertividade_restrita==true)
{
estatistica.Reset();
AtualizarEstatisticas(estatistica);
}
//=====================================================================
======================================================================
=================
string msg="";
if(Entrada==NA_PROXIMA_VELA)
{
msg = " ENTRADA "
+"n 》》 "+nome_sala+" 《《"
+"nn"
+" SINAL "+Symbol()+" "+up+"n"
+" ENTRADA "+GetHoraMinutos(tempo)+"n"
+" "+msg2+"n"
+" Expiração de "+expiracao;
}
- 48. else
{
msg = !mostrar_taxa ? " ENTRADA "
+"n 》》 "+nome_sala+" 《《"
+"nn"
+" SINAL "+Symbol()+" "+up+"n"
+" ENTRADA "+GetHoraMinutos(tempo)+" (AGORA)n"
+" EXPIRAÇÃO
"+GetHoraMinutos2(horario_expiracao[ArraySize(horario_expiracao)-1])+"n"
+" "+msg2+"n"
+" Expiração de "+expiracao : " ENTRADA "
+"n 》》 "+nome_sala+" 《《"
+"nn"
+" SINAL "+Symbol()+" "+up+"n"
+" ENTRADA "+GetHoraMinutos(tempo)+" (AGORA)n"
+" TAXA "+DoubleToString(entrada1[ArraySize(entrada1)-1])+"n"
+" EXPIRAÇÃO
"+GetHoraMinutos2(horario_expiracao[ArraySize(horario_expiracao)-1])+"n"
+" "+msg2+"n"
+" Expiração de "+expiracao;
}
//=====================================================================
======================================================================
=================
if(assertividade_global==true && assertividade_restrita==true)
{
msg+="nnWin: "+IntegerToString(estatistica.win_global)+" | Loss:
"+IntegerToString(estatistica.loss_global)+" ("+estatistica.assertividade_global_valor+")n";
msg+="Esse par:
"+IntegerToString(estatistica.win_restrito)+"x"+IntegerToString(estatistica.loss_restrito)+"
("+estatistica.assertividade_restrita_valor+")";
}
else
if(assertividade_global==true && assertividade_restrita==false)
msg+="nnWin: "+IntegerToString(estatistica.win_global)+" | Loss:
"+IntegerToString(estatistica.loss_global)+" ("+estatistica.assertividade_global_valor+")n";
else
if(assertividade_global==false && assertividade_restrita==true)
msg+="nnEsse par:
"+IntegerToString(estatistica.win_restrito)+"x"+IntegerToString(estatistica.loss_restrito)+"
("+estatistica.assertividade_restrita_valor+")";
- 49. if(TelegramSendTextAsync(apikey, chatid, msg)==IntegerToString(0)
)
{
Print("=> Enviou sinal de CALL para o Telegram");
}
befTime_telegram = Time[0];
}
//=====================================================================
======================================================================
=================
else
if(PossibleBufferDw[i] != 0 && PossibleBufferDw[i] != EMPTY_VALUE &&
befTime_telegram != Time[0] //Entra Na Proxima Vela <==
&&(iTime(NULL,PERIOD_M1,0) > desativar_sinais_horario))
//=====================================================================
======================================================================
=================
{
ArrayResize(entrada1,ArraySize(entrada1)+1);
entrada1[ArraySize(entrada1)-1]=Close[0];
if(Entrada==NA_MESMA_VELA)
{
ArrayResize(horario_entrada,ArraySize(horario_entrada)+1);
horario_entrada[ArraySize(horario_entrada)-1]=iTime(Symbol(),_Period,0);
datetime time_final = iTime(Symbol(),_Period,0)+tempo_expiracao*60;
datetime horario_inicial = Offset(iTime(Symbol(),_Period,0),time_final);
int tempo_restante = TimeMinute(time_final)-TimeMinute(horario_inicial);
if(tempo_restante==1 && TimeSeconds(TimeLocal())>30)
{
ArrayResize(horario_expiracao,ArraySize(horario_expiracao)+1);
horario_expiracao[ArraySize(horario_expiracao)-
1]=iTime(Symbol(),_Period,0)+(tempo_expiracao*2)*60;
}
else
{
ArrayResize(horario_expiracao,ArraySize(horario_expiracao)+1);
horario_expiracao[ArraySize(horario_expiracao)-
1]=iTime(Symbol(),_Period,0)+tempo_expiracao*60;
}
}
else
{
- 50. datetime h_entrada=iTime(Symbol(),_Period,0)+_Period*60;
ArrayResize(horario_entrada,ArraySize(horario_entrada)+1);
horario_entrada[ArraySize(horario_entrada)-1]=h_entrada;
ArrayResize(horario_expiracao,ArraySize(horario_expiracao)+1);
horario_expiracao[ArraySize(horario_expiracao)-1]=
h_entrada+tempo_expiracao*60;
}
ArrayResize(tipo_entrada,ArraySize(tipo_entrada)+1);
tipo_entrada[ArraySize(tipo_entrada)-1]=PUT;
ArrayResize(horario_entrada_local,ArraySize(horario_entrada_local)+1);
horario_entrada_local[ArraySize(horario_entrada_local)-
1]=GetHoraMinutos(iTime(Symbol(),_Period,0));
datetime tempo = Entrada==NA_PROXIMA_VELA ? iTime(Symbol(),_Period,0)
: iTime(Symbol(),PERIOD_M1,0);
estatisticas estatistica;
if(assertividade_global==true || assertividade_restrita==true)
{
estatistica.Reset();
AtualizarEstatisticas(estatistica);
}
//=====================================================================
======================================================================
=================
string msg="";
if(Entrada==NA_PROXIMA_VELA)
{
msg = " ENTRADA "
+"n 》》 "+nome_sala+" 《《"
+"nn"
+" SINAL "+Symbol()+" "+down+"n"
+" ENTRADA "+GetHoraMinutos(tempo)+"n"
+" "+msg2+"n"
+" Expiração de "+expiracao;
}
else
{
msg = !mostrar_taxa ? " ENTRADA "
+"n 》》 "+nome_sala+" 《《"
+"nn"