Gohan scalper provision - ict sniper robot

Specification

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

Responded

1
Developer 1
Rating
(6)
Projects
4
0%
Arbitration
5
0% / 100%
Overdue
0
Free
Similar orders
hello great developer I’m hiring a developer to build a local-only trade copier that sends trades from MT4 and MT5 to NinjaTrader 8 (NT8) in real-time. This copier must be reliable, fast, and fully executable without cloud dependence. I require a short test/demo period before full delivery to ensure quality and performance. here is the full project specs in the file check it please
I need a reliable, clean-coded Expert Advisor built for both MetaTrader 4 and MetaTrader 5 platforms. Main trading behavior: The EA follows buy and sell arrows produced by my custom indicator. Whenever a buy arrow shows up on the chart: if a sell position is currently open → close that sell immediately and enter a buy trade in its place. Whenever a sell arrow appears: if a buy position exists → close the buy and
Hello I'm looking for professional to create a robot to me that will enter us30 or nasdaq around 16H29-minute55-Second New York session opening Monday to Friday and put stop loss 3800 points away from entry hedging strategy
*I am looking for an experienced MQL5 developer to build a custom Expert Advisor (EA) for MetaTrader 5 based on my proprietary trading strategy. The full strategy details will be shared privately with the selected developer after agreement. The EA must be designed for automated trade execution with a strong focus on accuracy, speed, and stability. It should support flexible input settings and allow for future
📋 Project Description I am looking for an experienced MT5 (MQL5) developer to code a fully automated Expert Advisor for NASDAQ (US100) based on a fixed, rule-based opening range breakout strategy. The strategy is mechanical, uses no discretionary logic, and must be coded exactly as specified below. 🕒 Time & Session Rules Market: NASDAQ (US100) Trading days: Monday–Friday Session open: 9:30 EST EA must convert
I want to add and remove few things in ea need some modification needed in ea developer should have some trading knowledge also to understand the requirement better and have good experience in coding
hi every one i need to get the source code from this ea for modification in meta trader 4 or meta trader 5. because i need to put in settings the number of open trades , as this is now opening unlimited trades
hello great developer I need help developing an ICT 2022 model indicator and testing it thoroughly to ensure optimal performance and accuracy. Scope of work - Create an ICT 2022 model indicator with specified features. - Conduct repeated tests and strategy tests to refine the indicator. - Implement midnight to 9:30 box high and low range settings. - Include signal settings for major liquidity and structure break with
Floating bot 30+ USD
I need someone to build an easy bot for me. Whenever the candle closes outside a particular horizonal line I will put on my mt5 chart then immediately after the candle close there will be an instant execution trade after the close of the candle and the sl will be at the current last low or high below or above for buy or sell. I will have a place where I will input the amount to be risked by one pair. For instance in
Core Requirements: Two selectable timeframes - dropdown inputs to choose from M1, M5, M15, H1, H4, D1, W1, MN1 Timeframe 1 = Chart's own timeframe (if chart is M5, TF1 should be M5) Timeframe 2 = Higher timeframe for confluence All Ichimoku components displayed for both timeframes: Tenkan-sen Kijun-sen Senkou Span A Senkou Span B Chikou Span Cloud (bullish and bearish) Technical Settings: All buffers accessible for

Project information

Budget
30+ USD
Deadline
to 10 day(s)