Julio Viera
Julio Viera
Julio Viera
Julio Viera
This is the last update to the Expert Advisor where I add now on your screen the volume info, the max volume, min volume and the current volume so you can choose the moment of your entry:
//+------------------------------------------------------------------+
//| EA-SIGNAL-TO-BUY-OR-SELL-SIGNALS.mq5 |
//| Julio Viera |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Julio Viera"
#property link "https://www.mql5.com"
#property version "1.00"

//===========================VARIABLES GENERALES ==============================
input int emafastPeriod = 14;
input int ema200Period = 200;
input int periodo_busqueda = 100; // Número de velas (barras) a revisar
input int punto_inicio = 1; // Comenzar desde la vela anterior (shift 1) hasta atrás.

//=== VARIABLES VOLUMEN ===
input int volumen_lookback = 25; // Número de velas para análisis de volumen

int emafasthandler, ema200handler;
double emafast[], ema200[];

//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
ArraySetAsSeries(emafast, true);
ArraySetAsSeries(ema200, true);
emafasthandler = iMA(_Symbol, _Period, emafastPeriod, 0, MODE_EMA, PRICE_CLOSE);
ema200handler = iMA(_Symbol, _Period, ema200Period, 0, MODE_EMA, PRICE_CLOSE);
return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Función para calcular volúmenes |
//+------------------------------------------------------------------+
void CalculateVolumeLevels(long ¤tVol, long &maxVol, long &minVol)
{
long volumes[];
ArraySetAsSeries(volumes, true);

// Copiar datos de tick volume (usando long en lugar de double)
CopyTickVolume(_Symbol, _Period, 0, volumen_lookback, volumes);

// Inicializar con primer valor
currentVol = volumes[0];
maxVol = volumes[1];
minVol = volumes[1];

// Encontrar máximo y mínimo en el lookback
for(int i = 1; i < volumen_lookback; i++)
{
if(volumes[i] > maxVol) maxVol = volumes[i];
if(volumes[i] < minVol) minVol = volumes[i];
}
}

//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//==================COPY BUFFER OF EMAS ======================================
CopyBuffer(emafasthandler, 0, 0, 3, emafast);
CopyBuffer(ema200handler, 0, 0, 3, ema200);

//========================CALCULAR VOLUMEN ===================================
long currentVolume, maxVolume, minVolume;
CalculateVolumeLevels(currentVolume, maxVolume, minVolume);

//========================ANALISIS OF PRICE===================================
double close[7];
for(int i = 0; i < 7; i++)
close[i] = iClose(_Symbol, _Period, i);

string closetendency = "LATERAL";
bool bullish_tendency_close = (close[0] > close[6]);
bool bearish_tendency_close = (close[0] < close[6]);

if(bullish_tendency_close)
closetendency = "BULLISH MARKET!!";
else if(bearish_tendency_close)
closetendency = "BEARISH MARKET!!";

//===============BUSQUEDA PRECIO MAXIMO Y MINIMO EN 100 VELAS
int indice_maximo = iHighest(_Symbol, PERIOD_CURRENT, MODE_HIGH, periodo_busqueda, punto_inicio);
int indice_minimo = iLowest(_Symbol, PERIOD_CURRENT, MODE_LOW, periodo_busqueda, punto_inicio);

double precio_maximo = iHigh(_Symbol, PERIOD_CURRENT, indice_maximo);
double precio_minimo = iLow(_Symbol, PERIOD_CURRENT, indice_minimo);

//=======================ANALISIS ESTRUCTURA EMAS============================
bool bullish_structure = (emafast[0] > ema200[0]);
bool bearish_structure = (emafast[0] < ema200[0]);

bool bullish_ema_cross = (emafast[1] < ema200[1]) && (emafast[0] > ema200[0]);
bool bearish_ema_cross = (emafast[1] > ema200[1]) && (emafast[0] < ema200[0]);

bool buy_time = bullish_ema_cross && (close[0] > emafast[0]);
bool sell_time = bearish_ema_cross && (close[0] < emafast[0]);

string structure = "LATERAL";
if(bullish_structure)
structure = "BULLISH MARKET STRUCTURE EMAS";
else if(bearish_structure)
structure = "BEARISH MARKET STRUCTURE EMAS";

string whattodo = "NO TRADE!!!";
if(buy_time)
whattodo = "BUY!!!";
else if(sell_time)
whattodo = "SELL!!";

Comment("SIGNAL SYSTEM FOR NEWBIES ON TRADING by jvieranieves54gmail.com",
"\n=============================================================",
"\n MAXIMUM PRICE AND MINIMUM PRICE",
"\n=======================================================",
"\nMaximum Price : ", DoubleToString(precio_maximo, _Digits),
" Minimum Price : ", DoubleToString(precio_minimo, _Digits),
"\n=======================================================",
"\nEMAS STRUCTURE TENDENCY : ", structure,
"\n=======================================================",
"\nJAPANESE CANDLES TENDENCY : ", closetendency,
"\n========================================================",
"\nVOLUME ANALYSIS (Last ", IntegerToString(volumen_lookback), " bars):",
"\nCurrent Volume: ", IntegerToString(currentVolume),
" | Max Volume: ", IntegerToString(maxVolume),
" | Min Volume: ", IntegerToString(minVolume),
"\n========================================================",
"\nWHAT TO DO : ", whattodo
);
}
//+------------------------------------------------------------------+
Julio Viera
Julio Viera
This is the manual for this EA Signal Advisor:📈 MANUAL DEL EA - SISTEMA DE SEÑALES
"Rueditas de aprendizaje" para trading seguro y educativo

🎯 DESCRIPCIÓN GENERAL
¿QUÉ ES ESTE EA?
Sistema educativo diseñado como "rueditas de aprendizaje" para trading automático, proporcionando señales claras mientras protege el capital.

FILOSOFÍA DEL SISTEMA
✅ Aprendizaje Seguro: Opera con criterios técnicos probados
✅ Protección de Capital: Señales filtradas para minimizar riesgos
✅ Educación Continua: Cada señal es una oportunidad de aprendizaje
CARACTERÍSTICAS PRINCIPALES
🎯 Análisis de Tendencia
Identifica la dirección del mercado usando EMAs

📊 Estructura de Mercado
Analiza máximos y mínimos para contexto general

🔍 Análisis de Volumen
Incluye volumen actual vs histórico para confirmación

⚡ Señales Claras
Indica exactamente QUÉ HACER en cada momento

🔧 INSTALACIÓN Y CONFIGURACIÓN
REQUISITOS DEL SISTEMA
📱 Plataforma: MetaTrader 5
💱 Par de Trading: Cualquier par (recomendado: EURUSD, XAUUSD)
⏰ Temporalidad: Cualquier timeframe (óptimo: H1, H4)
🏢 Broker: Cualquier broker con MT5
PASOS DE INSTALACIÓN
Descargar el EA: Archivo `.mq5`
Copiar a Plataforma:
Abrir MetaTrader 5
Ir a: `File → Open Data Folder`
Navegar a: `MQL5/Experts/`
Pegar el archivo del EA
Compilar:
En MT5, ir a `View → Navigator`
Buscar el EA, click derecho → `Compile`
Activar en Gráfico:
Arrastrar el EA desde Navigator al gráfico
Configurar parámetros (opcional)
Aceptar
CONFIGURACIÓN DE PARÁMETROS
Parámetro Valor Default Descripción
emafastPeriod 14 Período del EMA rápido para tendencia inmediata
ema200Period 200 Período del EMA lento para tendencia principal
periodo_busqueda 100 Velas a analizar para máximos/mínimos
volumen_lookback 25 Velas para análisis de volumen histórico
📊 SEÑALES DE TRADING
INTERPRETACIÓN DEL PANEL DE INFORMACIÓN
1. PRECIOS MÁXIMO Y MÍNIMO
Ejemplo: Maximum Price: 1.08540 | Minimum Price: 1.07820

Interpretación: Rango de trading de las últimas 100 velas

2. ESTRUCTURA ALCISTA EMAS
BULLISH MARKET STRUCTURE EMAS

→ EMA 14 > EMA 200 → Mercado alcista

3. ESTRUCTURA BAJISTA EMAS
BEARISH MARKET STRUCTURE EMAS

→ EMA 14 < EMA 200 → Mercado bajista

4. ANÁLISIS DE VOLUMEN
VOLUME ANALYSIS (Last 25 bars):

Current Volume: 15240 | Max Volume: 28500 | Min Volume: 8200

Interpretación:

Volumen alto → Mayor convicción en la dirección
Volumen bajo → Posible cambio de tendencia
Comparar actual vs histórico para contexto
5. SEÑAL DE COMPRA
BUY!!! - Entrar en compra cuando todas las condiciones se alinean

6. SEÑAL DE VENTA
SELL!! - Entrar en venta cuando todas las condiciones se alinean

7. NO OPERAR
NO TRADE!!! - Esperar, condiciones no óptimas

REGLAS DE ENTRADA
✅ CONDICIONES PARA COMPRA:
Estructura Alcista: EMA 14 > EMA 200
Cruce Alcista: EMA 14 cruza por encima de EMA 200
Precio Soportado: Precio > EMA 14
Volumen Confirmante: Volumen actual preferiblemente alto
✅ CONDICIONES PARA VENTA:
Estructura Bajista: EMA 14 < EMA 200
Cruce Bajista: EMA 14 cruza por debajo de EMA 200
Precio Resistido: Precio < EMA 14
Volumen Confirmante: Volumen actual preferiblemente alto
🚫 NO OPERAR CUANDO:
Muestra "NO TRADE!!!"
Mercado lateral (EMAs muy cercanos)
Volumen muy bajo (falta de convicción)
Señales contradictorias entre indicadores
🛡️ GESTIÓN DE RIESGOS
PARA TRADERS PRINCIPIANTES
💰 Regla 1%-2%
Nunca arriesgar más del 1-2% del capital por operación

🎯 Risk/Reward 1:1.5
Buscar tomar más ganancia que el riesgo asumido

⏰ Horarios de Mercado
Operar en sesiones principales (Londres/NY) para mejor volumen

CONSEJOS DE PROTECCIÓN
Stop Loss Obligatorio: Siempre usar protección
Take Profit Razonable: Basado en soportes/resistencias
Evitar Noticias: No operar durante anuncios económicos importantes
Revisar Diario: Analizar operaciones cada día
EJEMPLO DE OPERACIÓN
📈 EJEMPLO DE OPERACIÓN DE COMPRA
Señal: "BUY!!!" en panel + estructura alcista

Entrada: Precio actual (ej: 1.08200)

Stop Loss: 50 pips (1.07700) - debajo de EMA 200

Take Profit: 75 pips (1.08950) - hacia máximo reciente

Risk/Reward: 1:1.5 ✓

❓ PREGUNTAS FRECUENTES
¿El EA ejecuta operaciones automáticamente?
No, este EA es solo de señales. Muestra qué hacer pero el trader debe ejecutar manualmente las operaciones.

¿En qué timeframes funciona mejor?
H1 y H4 son los más estables. Timeframes menores (M1-M15) pueden generar muchas señales falsas.

¿Necesito algún conocimiento previo?
No, está diseñado para principiantes. Sin embargo, recomiendo aprender conceptos básicos de trading.

¿Qué hago cuando dice "NO TRADE!!!"?
ESPERAR. Es la señal más importante. Significa que las condiciones no son óptimas y es mejor no operar.

¿Cómo interpreto el análisis de volumen?
Compara el volumen actual con el histórico:

Actual cerca del máximo → Mayor convicción
Actual cerca del mínimo → Falta de interés
Usa como CONFIRMACIÓN, no como señal principal
🎓 PALABRAS FINALES
Este EA es tu compañero de aprendizaje, no un sistema de "hacerse rico rápido". Úsalo para:

📚 Aprender
Identificar tendencias y estructura de mercado

💪 Practicar
Disciplina y paciencia en trading

🔍 Entender
Importancia del volumen y confirmación

🎯 Desarrollar
Paciencia (NO TRADE es señal válida)

¡RECUERDA!
El mejor trader no es el que más gana, sino el que menos pierde.

Manual creado para la comunidad trading

¡Compartir conocimiento es crecer juntos! 🚀
Julio Viera
Julio Viera
I was working on this Expert Advisor thinking of the newbies traders that needs some solid confirmation entries, This program was done following the Dow's Law, the action of price. Just Open your MT5 program, press F4 go to File, create a new Expert Advisor, and just copy and paste the code and compile you can check it with debugging Historical Data, the Program will give you the entries:
//+------------------------------------------------------------------+
//| EA-SIGNAL-TO-BUY-OR-SELL-SIGNALS.mq5 |
//| Julio Viera |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Julio Viera"
#property link "https://www.mql5.com"
#property version "1.00"

//===========================VARIABLES GENERALES ==============================
input int emafastPeriod = 14;
input int ema200Period = 200;
input int periodo_busqueda = 100; // Número de velas (barras) a revisar
input int punto_inicio = 1; // Comenzar desde la vela anterior (shift 1) hasta atrás.

int emafasthandler, ema200handler;
double emafast[], ema200[];

//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
ArraySetAsSeries(emafast, true);
ArraySetAsSeries(ema200, true);
emafasthandler = iMA(_Symbol, _Period, emafastPeriod, 0, MODE_EMA, PRICE_CLOSE);
ema200handler = iMA(_Symbol, _Period, ema200Period, 0, MODE_EMA, PRICE_CLOSE);
return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//==================COPY BUFFER OF EMAS ======================================
CopyBuffer(emafasthandler, 0, 0, 3, emafast);
CopyBuffer(ema200handler, 0, 0, 3, ema200);

//========================ANALISIS OF PRICE===================================
double close[7];
for(int i = 0; i < 7; i++)
close[i] = iClose(_Symbol, _Period, i);

string closetendency = "LATERAL";
bool bullish_tendency_close = (close[0] > close[6]);
bool bearish_tendency_close = (close[0] < close[6]);

if(bullish_tendency_close)
closetendency = "BULLISH MARKET!!";
else if(bearish_tendency_close)
closetendency = "BEARISH MARKET!!";

//===============BUSQUEDA PRECIO MAXIMO Y MINIMO EN 100 VELAS
int indice_maximo = iHighest(_Symbol, PERIOD_CURRENT, MODE_HIGH, periodo_busqueda, punto_inicio);
int indice_minimo = iLowest(_Symbol, PERIOD_CURRENT, MODE_LOW, periodo_busqueda, punto_inicio);

double precio_maximo = iHigh(_Symbol, PERIOD_CURRENT, indice_maximo);
double precio_minimo = iLow(_Symbol, PERIOD_CURRENT, indice_minimo);

//=======================ANALISIS ESTRUCTURA EMAS============================
bool bullish_structure = (emafast[0] > ema200[0]);
bool bearish_structure = (emafast[0] < ema200[0]); // Corregido: bearsih -> bearish

bool bullish_ema_cross = (emafast[1] < ema200[1]) && (emafast[0] > ema200[0]);
bool bearish_ema_cross = (emafast[1] > ema200[1]) && (emafast[0] < ema200[0]);

bool buy_time = bullish_ema_cross && (close[0] > emafast[0]);
bool sell_time = bearish_ema_cross && (close[0] < emafast[0]);

string structure = "LATERAL";
if(bullish_structure)
structure = "BULLISH MARKET STRUCTURE EMAS";
else if(bearish_structure)
structure = "BEARISH MARKET STRUCTURE EMAS";

string whattodo = "NO TRADE!!!";
if(buy_time)
whattodo = "BUY!!!";
else if(sell_time)
whattodo = "SELL!!";

Comment("SIGNAL SYSTEM FOR NEWBIES ON TRADING by jvieranieves54gmail.com",
"\n=============================================================",
"\n MAXIMUM PRICE AND MINIMUM PRICE",
"\n=======================================================",
"\nMaximum Price : ", DoubleToString(precio_maximo, _Digits),
" Minimum Price : ", DoubleToString(precio_minimo, _Digits),
"\n=======================================================",
"\nEMAS STRUCTURE TENDENCY : ", structure,
"\n=======================================================",
"\nJAPANESE CANDLES TENDENCY : ", closetendency,
"\n========================================================",
"\nWHAT TO DO : ", whattodo
);
}
//+------------------------------------------------------------------+
Julio Viera
Julio Viera
This is what I was looking for in the Candle Structure + EMA 200 Expert Advisor, only 562 transactions done, and took 10000 to 19670.00, the counter is the trick on this bot, it will get 3 transactions and because we know the market will slowly get tired and reverse, so the last transaction the bot risk only 1/3 of stop loss. Is accurate reading the previous structure candles to know when to by or sell, and use the ema 200 to know also the trending and bullish markets, you can see I took long transactions about 500 pips agains 100 pips, with a lot of .50. All this data can be change on the bot depending the currency you are trading.
Julio Viera
Julio Viera
Working on short timeframes EA using Traders Scalping Strategies. Still working when theres a market structure for a trade, and then a news comes up and reverse your trading, looking to add a trailing stop to the bot so it will protect the capital invested, I am also testing a risky return 1:4 only in gold and jpyusd, the eurousd has to be lower, like a 1:1 or maybe 1:2, still working on it.
Julio Viera
Hat sich auf MQL5.community registriert
12