Tarea técnica
//+------------------------------------------------------------------+
//| Gohan Scalper provision.mq5 |
//| Advanced Multi-Timeframe Forex Robot |
//+------------------------------------------------------------------+
#property copyright "Tshegofatso"
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
#include <Trade/Trade.mqh>
CTrade trade;
//+------------------------------------------------------------------+
//| Input Parameters |
//+------------------------------------------------------------------+
enum ModeType { CONSERVATIVE, BALANCED, AGGRESSIVE };
input ModeType TradeMode = BALANCED;
input double RiskPercent = 1.0;
input double DefaultStopLossPips = 20.0;
input double MaxLot = 2.0;
//+------------------------------------------------------------------+
//| Session Time Checking |
//+------------------------------------------------------------------+
bool IsInTradingSession()
{
MqlDateTime t;
TimeToStruct(TimeCurrent(), t);
int timeInMinutes = t.hour * 60 + t.min;
return (timeInMinutes >= 60 && timeInMinutes <= 480) || // Asian
(timeInMinutes >= 480 && timeInMinutes <= 960) || // London
(timeInMinutes >= 780 && timeInMinutes <= 1320); // New York
}
//+------------------------------------------------------------------+
//| Trend Detection (D1) |
//+------------------------------------------------------------------+
int GetMarketTrend()
{
static int maFastHandle = iMA(_Symbol, PERIOD_D1, 20, 0, MODE_EMA, PRICE_CLOSE);
static int maSlowHandle = iMA(_Symbol, PERIOD_D1, 50, 0, MODE_EMA, PRICE_CLOSE);
double maFast[], maSlow[];
if(CopyBuffer(maFastHandle, 0, 0, 1, maFast) < 1 ||
CopyBuffer(maSlowHandle, 0, 0, 1, maSlow) < 1)
return 0;
if (maFast[0] > maSlow[0]) return 1; // Bullish
if (maFast[0] < maSlow[0]) return -1; // Bearish
return 0; // Sideways
}
//+------------------------------------------------------------------+
//| Break of Structure (M15) |
//+------------------------------------------------------------------+
bool DetectBreakOfStructure()
{
double highs[2];
if(CopyHigh(_Symbol, PERIOD_M15, 1, 2, highs) < 2)
return false;
return highs[0] > highs[1];
}
//+------------------------------------------------------------------+
//| Confirmation Candle (M5) |
//+------------------------------------------------------------------+
bool IsConfirmationCandle()
{
double open[1], close[1], high[1], low[1];
if(CopyOpen(_Symbol, PERIOD_M5, 0, 1, open) < 1 ||
CopyClose(_Symbol, PERIOD_M5, 0, 1, close) < 1 ||
CopyHigh(_Symbol, PERIOD_M5, 0, 1, high) < 1 ||
CopyLow(_Symbol, PERIOD_M5, 0, 1, low) < 1)
return false;
double body = MathAbs(close[0] - open[0]);
double range = high[0] - low[0];
return (body > range * 0.5);
}
//+------------------------------------------------------------------+
//| Lot Size Calculation |
//+------------------------------------------------------------------+
double CalculateLotSize(double stopLossPips)
{
double balance = AccountInfoDouble(ACCOUNT_BALANCE);
double riskAmount = balance * (RiskPercent / 100.0);
double pipValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
double lotSize = riskAmount / (stopLossPips * pipValue);
return MathMin(MaxLot, MathMax(0.01, NormalizeDouble(lotSize, 2)));
}
//+------------------------------------------------------------------+
//| Enter Buy Trade |
//+------------------------------------------------------------------+
void EnterBuyTrade(double lot, double stopLossPips)
{
double sl = SymbolInfoDouble(_Symbol, SYMBOL_BID) - stopLossPips * _Point;
trade.Buy(lot, _Symbol, 0, sl, 0, "Buy Entry");
}
//+------------------------------------------------------------------+
//| Enter Sell Trade |
//+------------------------------------------------------------------+
void EnterSellTrade(double lot, double stopLossPips)
{
double sl = SymbolInfoDouble(_Symbol, SYMBOL_ASK) + stopLossPips * _Point;
trade.Sell(lot, _Symbol, 0, sl, 0, "Sell Entry");
}
//+------------------------------------------------------------------+
//| Expert Tick Function |
//+------------------------------------------------------------------+
void OnTick()
{
if(!IsInTradingSession()) return;
int trend = GetMarketTrend();
if(trend == 0) return;
if(!DetectBreakOfStructure()) return;
if(!IsConfirmationCandle()) return;
double lot = CalculateLotSize(DefaultStopLossPips);
if(trend > 0)
EnterBuyTrade(lot, DefaultStopLossPips);
else
EnterSellTrade(lot, DefaultStopLossPips);
}
//+------------------------------------------------------------------+
//| OnInit and Timer Hooks |
//+------------------------------------------------------------------+
int OnInit()
{
EventSetTimer(60);
return INIT_SUCCEEDED;
}
void OnDeinit(const int reason)
{
EventKillTimer();
}
void OnTimer()
{
// Reserved for advanced wave/fakeout/FVG logic
}
Han respondido
1
Evaluación
Proyectos
4
0%
Arbitraje
5
0%
/
100%
Caducado
0
Libre
Solicitudes similares
Jona copilot v12
30 - 40 USD
Hi, I'm interested in ordering an MT4 trading bot. Before we begin, could you please send me the technical specifications and requirements you'll need? Specifically, I'd like to know: - The trading strategy the bot will use. - The currency pairs or instruments it will trade. - The timeframes it supports. - Risk management features (lot sizing, stop loss, take profit, trailing stop, maximum drawdown). - Whether it
Hola, traders e inversores: Desarrollamos soluciones de trading algorítmico para MetaTrader 4 y MetaTrader 5. Creamos bots, indicadores y herramientas a medida que convierten estrategias manuales en sistemas automáticos, configurables y orientados a una gestión de riesgo sólida. Hemos trabajado en automatizaciones que integran entradas y salidas por reglas, cálculo de lotaje, control de drawdown, filtros de horario y
Bollinger and rRSI
30+ USD
automatic robo sell at bollinger band upwards breach and rsi should above 80 and buy when bollinger breach downwards and rsi is below 30, rsi shoould works only on Gold trade and none ofhe trades
Hello, I need a custom Expert Advisor for MetaTrader 5. I am trading from mobile only. **Account & Style:** - Capital: $5,000 - $10,000 - Risk: Moderate/Balanced - Trading Style: Scalping **Pairs & Timeframe:** - Symbols: EURUSD and XAUUSD - Timeframe: M5 **Strategy:** - BUY: RSI(14) < 30 AND Price > 20 EMA - SELL: RSI(14) > 70 AND Price < 20 EMA - Only 1 trade per symbol at a time - No Martingale / No Grid **Risk
Mac200
50+ USD
I need a Trend following Bot. Here we took entries by looking at two indicator which are 200 period ema and 12 26 9 MacD. Rules for entry exit are: Buy trade: When market is above 200 ema and MacD Line cross over the signal line and this cross over happened below the zero line of MacD indicator. We simply put Buy trade. Sell trade: When market is below 200 ema and MacD line crosses below the signal line and this
1. The general process is: Automated online forex marketing to find potential clients -> Answering potential clients' questions -> Converting them into actual clients -> Opening accounts, depositing funds, and copying trades. 2. Developers could implement an AI Digital Twin/Shadow Agent to answer customer questions, eliminating the need for me to answer customer inquiries. 3. I have a CTA website and I'm manually
Iconic Boy
300 - 400 USD
Am looking for a bot to trade .so that I can be able to trade and become very successful and make some profit so that I cannot sleep on a empty stomach
Macd Rsi stochastic vwap Bot. I have code.
150 - 300 USD
Привіт. Шукаю когось, хто б застосував мій код як бота . Я торгую індексом Aus_200 SFE (не XJO). Бот базується на MACD входу/виходу, RSI, стохастиці та vwap. Як тільки роботу приймуть, мені потрібно внести кілька коректив; однак, нічого суттєвого. Дякую
Custom MT5 EA for buy stop and sell stop breakout strategy.’ ‘Requirements, develop a custom Expert Advisor for MetaTrader 5 that places buy-stop and sell-stop pending orders based on defined breakout rules.’ ‘All important values adjustable via inputs.’ ‘Includes stop loss, take profit, trailing stop, and configurable risk management.’ ‘One trade at a time, works on demo before live.’ Provide source code and
A good trend predicting indicator is the one which can identify the trend change as soon as it happens on the chart. when a new candle is formed it should tell whether its going to go up or down. I have already seen a lot of repainting trend predictors so if your indicator is repainting then please don't bother contacting. I would like to see the demo version and then if satisfied , I would want the source code too
Información sobre el proyecto
Presupuesto
30+ USD
Plazo límite de ejecución
a 10 día(s)