“Seeking EA Developer for Automated NAS100 Trading with News Filter and Breakout Strategy”

Tarea técnica

This is what I got so far with deepseek: Could you create an Expert Advisor (EA) based on the following detailed trading strategy?

1. Risk-to-Reward Ratio
The EA should maintain a minimum risk-to-reward ratio of 5:1.
I am willing to risk no more than 1% of my total account size per trade.

2. News Avoidance and Timing Adjustments
The EA should automatically avoid trading during major and medium-impact news events by integrating an economic calendar or news filter.
Key Rules Regarding News:
If news events occur between 7:30 AM and 9:00 AM CST (Central Standard Time), the EA must wait for the news to take place and only start trading 15 minutes after the last news event.
If news candles break the initial 2:00 AM–7:00 AM range:
If the highs of the initial range are broken, the EA can trade breakouts of the news candle highs (in the direction of the broken range) or breakouts of the initial range lows (in the opposite direction).
If the lows of the initial range are broken, the EA can trade breakouts of the news candle lows (in the direction of the broken range) or breakouts of the initial range highs (in the opposite direction).
If the news candles do not break either side of the initial range, the EA can still trade breakouts of the unbroken side of the initial range, provided a 5-minute full-body candle breaks the range.
No trades should be entered after 12:00 PM CST.

3. Trading Instrument and Timeframe
The EA will trade the NAS100 index on the 5-minute timeframe.
The initial price range to monitor is the range established between 2:00 AM and 7:00 AM CST (adjusted to align with my broker’s timezone of GMT+2).
The range is defined by the highest and lowest points of the candle bodies (excluding wicks) during this period.

4. Entry Criteria
The EA should place trades only when the range is broken by a full-body candle closure.
A full-body candle is defined as one with at least a 70% body-to-wick ratio.
Trade logic:
If the initial range is broken by news candles, you can trade both in the direction of the news breakout (either highs or lows of the news candles) or in the opposite direction of the breakout (the unbroken side of the original range).
If the news candles do not break the range, the EA can trade the breakout of the unbroken side of the original range using a 5-minute full-body candle.

5. Stop-Loss and Take-Profit Rules
Initial Stop-Loss: 25 points.
Take-Profit Target: 125 points.
Break-Even Rule: Once the price moves 50 points in profit, the stop-loss should automatically be moved to breakeven.

6. Example Trade Setup
I have attached an example image of a trade setup for reference.

7. Broker Timezone and Adjustments
My broker’s timezone is GMT+2, while my local time is CST (Central Standard Time). Please ensure the range calculations are adjusted accordingly (i.e., 2:00 AM to 7:00 AM CST).

Could you ensure the EA incorporates these details, especially the logic for trading the opposite direction of the news candles as well as the unbroken side of the initial range? Let me know if anything needs further clarification! Here's a conceptual outline for the Expert Advisor (EA) based on your strategy. Note that full implementation requires integration with an economic calendar (external service) and thorough backtesting:

```mq4
//+------------------------------------------------------------------+
//|                                              NAS100_NewsEA.mq4   |
//|                        Copyright 2023, Your Company Name         |
//|                                        https://www.yourdomain.com|
//+------------------------------------------------------------------+
#property copyright "Copyright 2023"
#property version   "1.00"
#property strict

//--- Input Parameters
input double RiskPercent     = 1.0;     // Risk per trade (%)
input int    StopLossPoints  = 25;      // SL (points)
input int    TakeProfitPoints= 125;     // TP (points)
input int    BreakEvenPoints = 50;      // BE at (points)

//--- Global Variables
double initialRangeHigh, initialRangeLow;
datetime newsAvoidStart, newsAvoidEnd;
bool rangeBroken = false;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
{
   DetermineInitialRange();
   DetermineNewsPeriods(); // Requires integration with news source
   return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
{
   if(!IsTradingAllowed()) return;
   
   static datetime lastBarTime;
   if(Time[0] == lastBarTime) return;
   lastBarTime = Time[0];
   
   CheckTradingConditions();
   ManageOpenPositions();
}

//+------------------------------------------------------------------+
//| Determine Initial Price Range                                    |
//+------------------------------------------------------------------+
void DetermineInitialRange()
{
   datetime cstStart = ConvertCSTToServer(2, 0);   // 2:00 AM CST
   datetime cstEnd = ConvertCSTToServer(7, 0);     // 7:00 AM CST
   
   initialRangeHigh = 0;
   initialRangeLow = EMPTY_VALUE;
   
   for(int i = iBarShift(NULL, 0, cstStart); i >= iBarShift(NULL, 0, cstEnd); i--)
   {
      double bodyHigh = MathMax(Open[i], Close[i]);
      double bodyLow = MathMin(Open[i], Close[i]);
      
      if(bodyHigh > initialRangeHigh) initialRangeHigh = bodyHigh;
      if(bodyLow < initialRangeLow) initialRangeLow = bodyLow;
   }
}

//+------------------------------------------------------------------+
//| Check Trading Conditions                                         |
//+------------------------------------------------------------------+
void CheckTradingConditions()
{
   // Check news impact
   if(IsNewsEvent()) return;
   
   // Check trading hours
   if(TimeCurrent() > ConvertCSTToServer(12, 0)) return; // 12:00 PM CST
   
   // Check breakout conditions
   CheckRangeBreakouts();
}

//+------------------------------------------------------------------+
//| Range Breakout Logic                                             |
//+------------------------------------------------------------------+
void CheckRangeBreakouts()
{
   // Check for valid breakout candle
   if(IsFullBodyCandle(0))
   {
      // Bullish breakout
      if(Close[0] > initialRangeHigh && !rangeBroken)
      {
         OpenTrade(OP_BUY);
         rangeBroken = true;
      }
      // Bearish breakout
      else if(Close[0] < initialRangeLow && !rangeBroken)
      {
         OpenTrade(OP_SELL);
         rangeBroken = true;
      }
   }
}

//+------------------------------------------------------------------+
//| Trade Management                                                 |
//+------------------------------------------------------------------+
void OpenTrade(int cmd)
{
   double lots = CalculateLots();
   int ticket = OrderSend(_Symbol, cmd, lots, 
                         cmd == OP_BUY ? Ask : Bid, 
                         3, 0, 0, "NewsBreakout", 0);
   
   if(ticket > 0)
   {
      double sl = cmd == OP_BUY ? Bid - StopLossPoints*Point : Ask + StopLossPoints*Point;
      double tp = cmd == OP_BUY ? Bid + TakeProfitPoints*Point : Ask - TakeProfitPoints*Point;
      OrderModify(ticket, 0, sl, tp, 0);
   }
}

//+------------------------------------------------------------------+
//| Money Management                                                 |
//+------------------------------------------------------------------+
double CalculateLots()
{
   double riskAmount = AccountBalance() * RiskPercent / 100;
   double tickValue = MarketInfo(_Symbol, MODE_TICKVALUE);
   return NormalizeDouble(riskAmount / (StopLossPoints * tickValue), 2);
}

//+------------------------------------------------------------------+
//| News Handling Functions (Placeholder - Requires Implementation)  |
//+------------------------------------------------------------------+
bool IsNewsEvent()
{
   // Requires integration with news API/calendar
   return false;
}

datetime ConvertCSTToServer(int hour, int minute)
{
   // CST to GMT+2 conversion (requires DST handling)
   return StrToTime(TimeToStr(TimeCurrent() - (8 * 3600) + (hour * 3600) + (minute * 60)));
}

//+------------------------------------------------------------------+
//| Additional Required Functions                                    |
//+------------------------------------------------------------------+
bool IsFullBodyCandle(int bar)
{
   double body = MathAbs(Close[bar] - Open[bar]);
   double range = High[bar] - Low[bar];
   return (range > 0) && (body/range >= 0.7);
}

void ManageOpenPositions()
{
   for(int i = OrdersTotal()-1; i >= 0; i--)
   {
      if(OrderSelect(i, SELECT_BY_POS))
      {
         if(OrderProfit() >= BreakEvenPoints*Point)
         {
            if(OrderStopLoss() != OrderOpenPrice())
               OrderModify(OrderTicket(), OrderOpenPrice(), OrderOpenPrice(), OrderTakeProfit(), 0);
         }
      }
   }
}
```

**Important Notes:**

1. **News Integration Required:** The `IsNewsEvent()` function needs integration with an economic calendar API (e.g., Forex Factory, FXCM API). This is not implemented here due to platform limitations.

2. **Time Zone Handling:** The `ConvertCSTToServer()` function assumes a fixed 8-hour offset. You may need to adjust for daylight saving time changes.

3. **Range Calculation:** The EA calculates the initial range using the first 5-minute bars of the trading day.

4. **Risk Management:** Position sizing automatically calculates based on 1% risk and 25-point stop loss.

5. **Order Management:** Implements break-even functionality at 50 points profit.

For a complete implementation, you would need to:

1. Integrate a news feed API
2. Implement proper timezone conversion with DST handling
3. Add error handling for order operations
4. Implement the counter-trend trading logic described
5. Add comprehensive logging and debugging features

Han respondido

1
Desarrollador 1
Evaluación
(328)
Proyectos
512
19%
Arbitraje
33
45% / 30%
Caducado
34
7%
Trabajando
2
Desarrollador 2
Evaluación
(51)
Proyectos
69
35%
Arbitraje
4
25% / 75%
Caducado
0
Libre
3
Desarrollador 3
Evaluación
(1)
Proyectos
1
0%
Arbitraje
1
0% / 100%
Caducado
0
Libre
4
Desarrollador 4
Evaluación
Proyectos
0
0%
Arbitraje
1
0% / 100%
Caducado
0
Libre
5
Desarrollador 5
Evaluación
(33)
Proyectos
35
20%
Arbitraje
5
40% / 40%
Caducado
0
Libre
Ha publicado: 1 ejemplo
6
Desarrollador 6
Evaluación
(7)
Proyectos
13
15%
Arbitraje
13
23% / 46%
Caducado
3
23%
Libre
Ha publicado: 25 artículos
7
Desarrollador 7
Evaluación
(8)
Proyectos
9
56%
Arbitraje
0
Caducado
0
Libre
8
Desarrollador 8
Evaluación
(362)
Proyectos
435
54%
Arbitraje
20
55% / 15%
Caducado
30
7%
Trabaja
9
Desarrollador 9
Evaluación
(5)
Proyectos
8
13%
Arbitraje
3
0% / 33%
Caducado
2
25%
Libre
Ha publicado: 1 ejemplo
10
Desarrollador 10
Evaluación
(77)
Proyectos
243
74%
Arbitraje
7
100% / 0%
Caducado
1
0%
Libre
Ha publicado: 1 artículo
11
Desarrollador 11
Evaluación
(258)
Proyectos
264
30%
Arbitraje
0
Caducado
3
1%
Libre
Ha publicado: 2 ejemplos
12
Desarrollador 12
Evaluación
(45)
Proyectos
46
24%
Arbitraje
34
9% / 85%
Caducado
10
22%
Libre
13
Desarrollador 13
Evaluación
(162)
Proyectos
288
35%
Arbitraje
18
22% / 61%
Caducado
42
15%
Trabaja
14
Desarrollador 14
Evaluación
(28)
Proyectos
39
23%
Arbitraje
14
0% / 93%
Caducado
4
10%
Libre
15
Desarrollador 15
Evaluación
(322)
Proyectos
499
67%
Arbitraje
5
40% / 0%
Caducado
4
1%
Libre
Ha publicado: 8 ejemplos
16
Desarrollador 16
Evaluación
(2)
Proyectos
1
0%
Arbitraje
1
0% / 100%
Caducado
0
Libre
17
Desarrollador 17
Evaluación
(1)
Proyectos
2
0%
Arbitraje
2
50% / 50%
Caducado
0
Libre
Solicitudes similares
I need a professional MT5 Expert Advisor (EA) built with clean, modular code. This is an advanced strategy combining liquidity concepts, controlled DCA, hedge protection, and strict risk management. Core Requirements: Entry Logic (ALL must align): Liquidity sweep (Previous Day High/Low breakout and return) EMA50 and EMA200 trend alignment Higher timeframe bias (H1 or H4) RSI confirmation Bollinger Band entry Filters
I need a professional MQL5 developer. BEFORE I SHARE ANY DETAILS: 1. You must sign a PERPETUAL NDA with no expiration date 2. NDA includes €100,000 penalty for any breach 3. I require full .mq5 source code ownership 4. Developer must have 500+ completed jobs, 4.9+ rating Budget: €1500 EUR Duration: 14 days Start your application with "RULER" to prove you read this
Pip Scalper Bot 60+ USD
i want a trading bot that is aleast 98% sure,and cam also do scalping 99% correct using smart money concept, ICT, ALL technical analysis on it and also put risk management on it
Greetings I need MT5 developer that has expertise in developing a custom indicator for mt5 boom and crash based on my exact details and requirements which would be discuss later. Kindly bid for this project if it is something you can handle for me
AI Trading MQL5: Maximizing Profit from a $10 Investment Achieving significant profits from a small initial capital like $10 in AI trading with MQL5 requires a highly strategic and disciplined approach. While the potential for exponential growth exists, it's crucial to manage expectations and understand the inherent risks. **Key Strategies for Small Capital AI Trading:** 1. **Low-Risk, High-Probability
I’m looking for an experienced NinjaTrader developer to complete an existing custom indicator. The project is already partially built and is well organized, completely functional, and well documented. The former developer experienced some personal difficulties and unfortunately cannot continue. Key Requirement (Read Carefully): You MUST have direct, hands-on experience with NinjaTrader and NinjaScript (C#) . This is
I need a professional developer to help me create an EA using RSI and Moving averages.The strategies are well organised and everything is in order. I will send all the details in the inbox
Powerful 30 - 100 USD
I really want a powerful developed EA that can generate a minimum of 10% every month without martingale, greed or any dangerous strategy for sale. Developer must provide the mql5 file or the raw file for modification etc
I already have a fully developed MT5 Expert Advisor with all required prop firm features, including: Risk management Daily loss & max drawdown limits Spread & slippage filters News filter Trade management system The EA structure is complete. 👉 What I need is a professional developer to replace ONLY the entry logic with a high-quality, rule-based trading strategy. 🚨 STRICT REQUIREMENT (READ CAREFULLY): I am NOT
Hello, I’m looking for an experienced developer who can help convert an existing cTrader indicator into a fully functional Quantower indicator . I already have the complete source code for the cTrader indicator (written in C#) , and I would like the same logic, behavior, and visual output to be accurately replicated in Quantower

Información sobre el proyecto

Presupuesto
30 - 200 USD