指定

//+------------------------------------------------------------------+
//| LEVEL 100 SNIPER BOT (SMC + ATR + RSI + Trend Filter)           |
//+------------------------------------------------------------------+
#property strict
#include <Trade/Trade.mqh>
CTrade trade;

//--- Inputs
input double RiskPercent = 1.0;
input int FastMA = 20;
input int SlowMA = 50;
input int RSI_Period = 14;
input int ATR_Period = 14;
input double ATR_Multiplier_SL = 1.5;
input double ATR_Multiplier_TP = 3.0;
input int MaxSpread = 25;

//--- Handles
int fastMAHandle, slowMAHandle, rsiHandle, atrHandle;

//+------------------------------------------------------------------+
int OnInit()
{
   fastMAHandle = iMA(_Symbol,_Period,FastMA,0,MODE_EMA,PRICE_CLOSE);
   slowMAHandle = iMA(_Symbol,_Period,SlowMA,0,MODE_EMA,PRICE_CLOSE);
   rsiHandle = iRSI(_Symbol,_Period,RSI_Period,PRICE_CLOSE);
   atrHandle = iATR(_Symbol,_Period,ATR_Period);

   if(fastMAHandle == INVALID_HANDLE) return INIT_FAILED;
   return INIT_SUCCEEDED;
}

//+------------------------------------------------------------------+
//| Lot calculation (REAL risk-based)                               |
//+------------------------------------------------------------------+
double LotSize(double stopLossPoints)
{
   double balance = AccountInfoDouble(ACCOUNT_BALANCE);
   double risk = balance * RiskPercent / 100.0;

   double tickValue = SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE);
   double lotStep = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP);

   double lot = risk / (stopLossPoints * tickValue);
   return NormalizeDouble(lot,2);
}

//+------------------------------------------------------------------+
//| Simple Market Structure (BOS detection)                         |
//+------------------------------------------------------------------+
bool BreakOfStructureBuy()
{
   double high1 = iHigh(_Symbol,_Period,1);
   double high2 = iHigh(_Symbol,_Period,2);

   return high1 > high2; // bullish BOS
}

bool BreakOfStructureSell()
{
   double low1 = iLow(_Symbol,_Period,1);
   double low2 = iLow(_Symbol,_Period,2);

   return low1 < low2; // bearish BOS
}

//+------------------------------------------------------------------+
//| Session Filter (London + NY)                                    |
//+------------------------------------------------------------------+
bool TradingSession()
{
   int hour = TimeHour(TimeCurrent());
   return (hour >= 8 && hour <= 18); // adjust to broker time
}

//+------------------------------------------------------------------+
bool HasPosition()
{
   for(int i=0;i<PositionsTotal();i++)
      if(PositionGetSymbol(i)==_Symbol) return true;

   return false;
}

//+------------------------------------------------------------------+
void OnTick()
{
   // Spread filter
   double spread = (SymbolInfoDouble(_Symbol,SYMBOL_ASK) -
                    SymbolInfoDouble(_Symbol,SYMBOL_BID))/_Point;

   if(spread > MaxSpread) return;
   if(!TradingSession()) return;
   if(HasPosition()) return;

   //--- buffers
   double fastMA[2], slowMA[2], rsi[1], atr[1];

   if(CopyBuffer(fastMAHandle,0,0,2,fastMA)<=0) return;
   if(CopyBuffer(slowMAHandle,0,0,2,slowMA)<=0) return;
   if(CopyBuffer(rsiHandle,0,0,1,rsi)<=0) return;
   if(CopyBuffer(atrHandle,0,0,1,atr)<=0) return;

   double atrPoints = atr[0] / _Point;

   double ask = SymbolInfoDouble(_Symbol,SYMBOL_ASK);
   double bid = SymbolInfoDouble(_Symbol,SYMBOL_BID);

   //--- BUY SNIPER CONDITIONS
   if(fastMA[0] > slowMA[0] &&        // trend up
      rsi[0] > 55 &&                 // momentum
      BreakOfStructureBuy())         // structure break
   {
      double slPoints = atrPoints * ATR_Multiplier_SL;
      double tpPoints = atrPoints * ATR_Multiplier_TP;

      double lot = LotSize(slPoints);

      double sl = bid - slPoints * _Point;
      double tp = bid + tpPoints * _Point;

      trade.Buy(lot,_Symbol,ask,sl,tp,"SNIPER BUY");
   }

   //--- SELL SNIPER CONDITIONS
   if(fastMA[0] < slowMA[0] &&
      rsi[0] < 45 &&
      BreakOfStructureSell())
   {
      double slPoints = atrPoints * ATR_Multiplier_SL;
      double tpPoints = atrPoints * ATR_Multiplier_TP;

      double lot = LotSize(slPoints);

      double sl = ask + slPoints * _Point;
      double tp = ask - tpPoints * _Point;

      trade.Sell(lot,_Symbol,bid,sl,tp,"SNIPER SELL");
   }
}

応答済み

1
開発者 1
評価
(382)
プロジェクト
491
23%
仲裁
59
54% / 25%
期限切れ
56
11%
取り込み中
2
開発者 2
評価
(168)
プロジェクト
201
48%
仲裁
5
20% / 60%
期限切れ
2
1%
3
開発者 3
評価
(25)
プロジェクト
33
24%
仲裁
3
33% / 33%
期限切れ
4
12%
仕事中
4
開発者 4
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
5
開発者 5
評価
(313)
プロジェクト
559
35%
仲裁
80
31% / 44%
期限切れ
203
36%
6
開発者 6
評価
(104)
プロジェクト
125
24%
仲裁
23
26% / 52%
期限切れ
8
6%
仕事中
7
開発者 7
評価
(2)
プロジェクト
2
0%
仲裁
0
期限切れ
0
8
開発者 8
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
仕事中
9
開発者 9
評価
(362)
プロジェクト
435
54%
仲裁
20
55% / 15%
期限切れ
30
7%
仕事中
10
開発者 10
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
11
開発者 11
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
類似した注文
Subject: Expert Advisor Refactoring & Optimization Request – ZigZagSignalTrader_SmallAcc Dear Developer, I am seeking a senior MQL5 developer to refactor and optimize an existing Expert Advisor titled "ZigZagSignalTrader_SmallAcc." The current version is a prototype designed for small accounts (0.01 lot) using a ZigZag and EMA trend-following strategy. While functional, the code requires professional hardening to
Panda101 500+ USD
//+------------------------------------------------------------------+ //| Simple Moving Average Crossover EA | //+------------------------------------------------------------------+ #property strict input int ShortMA = 10; input int LongMA = 50; input double LotSize = 0.01; int shortMAHandle; int longMAHandle; //+------------------------------------------------------------------+ int OnInit() { shortMAHandle =
Panda402 30 - 100000 USD
The file must be fast to move with the market. It must be transparent it must move accordingly with the market and increase the money and also with less risk
Description: I am looking for an experienced MT4/MT5 (MQL4/MQL5) developer for consultation and possible future development of an advanced Expert Advisor architecture. This is NOT a simple RSI, MACD, martingale, or indicator-only EA project. I already have an existing EA framework using: RSI timing logic EMA direction filters trend and volatility filters DCA / basket management protection and recovery logic Now I
I need an experienced MQL5 developer to build a custom MT5 Expert Advisor for XAUUSD. Strategy Overview: Trend-following using EMA 50/200 on H4 and H1 Pullback entries on M5 using RSI + candle confirmation No martingale, no averaging down Controlled scaling only when trades are already in profit Maximum 2–3 positions per direction Risk Management: Daily loss limit (%) Equity hard stop (%) Consecutive loss pause
I am looking for an experienced MT4 developer or strategy tester to run a comprehensive optimization of my existing Expert Advisor (EA). The EA is already developed and working as intended — your task will be to configure and execute the optimization process using the "Every tick based on real ticks" model. Scope of Work: Run EA optimization in MT4 Strategy Tester. Use "Every tick based on real ticks" as the
Gold Edge Pro 30 - 150 USD
Create a fully working Expert Advisor (EA) for MetaTrader 5, designed exclusively for GOLD (XAUUSD only). This is a high‑probability trend‑following breakout strategy built specifically for passing 2‑step prop firm challenges — it delivers a ~60–65% win rate, uses a strict 1:3 risk/reward ratio, and is optimised to pass both phases in roughly 1–2 weeks total. --- ⚙️ USER INPUTS — FULLY FLEXIBLE RISK --- All main
This EA is for trading XAUUSD. There are 2 trade logics. One based on trend reversal (with 5 trade opening conditions). The second is based on trend continuation (with 1-2 conditions)
I want the bot to be fully automated trading key levels of (support and resistance ) from the higher-timeframe with atleast a 70% win rate. Experienced developer with atleast 3-4 years THANK YOU
Patricia Ukawilu 6:43 PM I need help creating an EA to optimize my trade. I already have a preliminary pine script which I will want optimized and create an EA from it to optimize my trade on MT4. I also subscribed to a signal app. I’m looking to automate the execution of the signal from the app so as not to miss out on good trades

プロジェクト情報

予算
100+ USD

依頼者

出された注文1
裁定取引数0