Making a quick alteration to the placing of brackets and/or braces to Nested If Statements

Trabajo finalizado

Plazo de ejecución 2 horas
Comentario del Cliente
Couldn't fault the Developer, speedy, efficient, professional.
Comentario del Ejecutor
Excellent. Happy to be of service.

Tarea técnica

Hello,

Due to the fact that I am getting so sick to the back teeth of MetaEdior not being able to read MQL4 code properly - despite me coding for years now - for some reason, these errors just won't go away and I'm getting extremely pissed off now. 

This is more of a placement of the brackets more than anything else, rather than the code itself but basically the rule is:

If Statement A is true, assess if Statement B or C (and ALL child statements) are true. If either statement B or C  (and ALL child statements)  are true, then proceed...

Because I have coded for a long time now, Im getting absolutely furious with this, there is no reason as to why I'm getting these unexpected tokens or empty controlled statement lines.

Completely stupidity at its finest.

if(BarTime != Time[0]){ /*Statemt A - if Statement A is true, proceed*/

      if(hammerHeadClose < hammerHeadOpen){ /*Statement B - if Statement B is true, proceed*/
      
         if(bearHammerHead >= Transform(candleBodyLength,2))
         if((bearHammerHead / bearHammerHandle) <= hammerHandlePct)
         if((bearHammerHead / bullRetracementCandle) <= hammerHeadPct);
      
      }
      
      else if(hammerHeadClose > hammerHeadOpen)) { /*Statement C...OR if Statement C is true, proceed...*/
      
         if(bearHammerHead >= Transform(candleBodyLength,2))
         if((bearHammerHead / bearHammerHandle) <= hammerHandlePct)
         if((bearHammerHead / bullRetracementCandle) <= hammerHeadPct);
      
      }

              
      if(hammerHeadClose < hammerHeadOpen)/*If Statement A is True AND EITHER Statement B OR C is true, then proceed....*/
      if(bearHammerHead >= Transform(candleBodyLength,2))
      if((bearHammerHead / bearHammerHandle) <= hammerHandlePct)
      if((bearHammerHead / bullRetracementCandle) <= hammerHeadPct)
      if((initialTrendBearCandle / bullRetracementCandle) <= retracePercentage)
      if(bullRetracementCandle >= Transform(candleBodyLength,2))
      if(iMA(NULL,0,Period_TrendFast,0, AM_TrendFast,PRICE_CLOSE,1) < iMA(NULL,0,Period_TrendSlow,0,AM_TrendSlow,PRICE_CLOSE,1))
      if(iMA(NULL,0,Period_MomentumFast,0,AM_MomentumFast,PRICE_CLOSE,1) < iMA(NULL,0,Period_MomentumSlow,0,AM_MomentumSlow,PRICE_CLOSE,1))
      if(NewBar)
      if(spread <= MaxSpread)
      if(hourOfDay >= startingHour && hourOfDay < endingHour)
      if(OrdersTotal()== 0)
      if(InitTime){

OrderSend(.......):}

f

Han respondido

1
Desarrollador 1
Evaluación
(3)
Proyectos
4
0%
Arbitraje
2
0% / 100%
Caducado
1
25%
Libre
2
Desarrollador 2
Evaluación
(139)
Proyectos
181
24%
Arbitraje
23
22% / 39%
Caducado
13
7%
Libre
3
Desarrollador 3
Evaluación
(5)
Proyectos
11
18%
Arbitraje
0
Caducado
3
27%
Libre
Solicitudes similares
Experienced Python/MT5 Developer Needed to Optimize XAUUSD Signal Engine — Increase Signal Frequency Without Sacrificing Quality 4 minutes ago Python Experts Design Strategy optimization Statistics and mathematics Python I am looking for an experienced developer specialized in Python, MetaTrader 5, algorithmic trading systems, market structure and XAUUSD, to work on an existing professional Gold/Forex AI signal
EMA Pin Bar EA 30 - 100 USD
I would like an EA that implements the strategy below: 1. It requires a 6 EMA, 18EMA, 50EMA and 200SMA 2. Trend filter: 50 is above 200 for a buy. 50 below 200 for a sell 3. FOR A BUY: After candle close, if 6 has crossed above 18 and trend filter is a buy: a. if the last candle was a pin bar (body is less than 50% of candle size, and upper wick is less than 10% of candle size) b. check if the candle is within 10
Title: Custom M5 Gold (XAUUSD Cent) Scalper EA with Daily Profit Target and Strict Risk Control 1. OVERVIEW & OBJECTIVE We need an Expert Advisor (EA) developed for MT4 and MT5 to trade XAU/USD Cent (XAUUSDc on HFM / HF Markets). The EA must operate fully autonomously on M5 charts, targeting micro-pips (3 to 5 cent movements) per trade. The core philosophy is "set-and-forget" with absolute risk protection to prevent
Hi, I’m looking for a **ready-made MT5 scalping EA specifically for Gold (XAUUSD)**. My main requirement is an **HTF scalping strategy**, so I’m looking for an existing robot that is already developed and can be tested before I make the purchase. I’m not looking to build one from scratch at this stage. I would like to first test the EA on a **demo account** to see how it performs under live market conditions and
Are you able to build one bot for stock and one for ninja trader and tell me the win rate on it. I need ninja trader bot that enter buy and exit according the move to do not stay long in the market in each entry . That can follow the smart money concept or other if you have a good one
Hi there I need an developer to create a ea for mt5 and mt4 but the ea should be an fast connect ea meaning by taping the ea then automatically it connect to mt5 chart same in mt4 It should place order using invisible buy and invisible sell when the bid price breakout in 1 point Automatically it place an order depends on which direction and invisible stop loss in points , please reply if you can
EA 35+ USD
Project Title: Development of a Custom Breakout Expert Advisor (EA) with Dynamic Trailing Stop, Advanced Security Filters, and On-Screen Dashboard for MT5 Project Description: Overview: I am looking for an experienced MQL5 developer to build a fully automated Trading Robot (Expert Advisor) for MetaTrader 5 based on a pending orders breakout strategy with strict dynamic risk management and customized time/profit
I need a TradingView Pine Script (v6) indicator that gives BUY and SELL signals in real time on the live chart. MAIN REQUIREMENT – NO REPAINTING: 1. Signals must appear only when the candle closes (barstate.isconfirmed). Example: on 1-min chart, signal for the 10:35 candle must appear at 10:36 and never disappear or move. 2. Signals on historical bars must look exactly the same as they looked live. 3. No lookahead
Project Title: Development of a Custom Breakout Expert Advisor (EA) with Dynamic Trailing Stop and On-Screen Dashboard for MT5 Project Description: Overview: I am looking for an experienced MQL5 developer to build a fully automated Trading Robot (Expert Advisor) for MetaTrader 5 based on a pending orders breakout strategy with strict dynamic risk management. The EA must be highly optimized, bug-free, and follow the
I am looking for an experienced developer to build a professional web-based trading performance dashboard connected to an MT5 trading account and/or FX Blue. The dashboard should automatically collect trading data and display: • Daily P&L calendar – profitable days green, losing days red and no-trade days grey • Equity/growth curve • Drawdown curve • Initial capital and current balance • Net profit and percentage

Información sobre el proyecto

Presupuesto
30+ USD
Plazo límite de ejecución
a 5 día(s)