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

仕事が完了した

実行時間2 時間
依頼者からのフィードバック
Couldn't fault the Developer, speedy, efficient, professional.
開発者からのフィードバック
Excellent. Happy to be of service.

指定

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

応答済み

1
開発者 1
評価
(3)
プロジェクト
4
0%
仲裁
2
0% / 100%
期限切れ
1
25%
2
開発者 2
評価
(139)
プロジェクト
181
24%
仲裁
23
22% / 39%
期限切れ
13
7%
3
開発者 3
評価
(5)
プロジェクト
11
18%
仲裁
0
期限切れ
3
27%
類似した注文
This is yakubu Jnr trading bots I create the trading robots to help my self and others traders to be successful please you can join my live trading bots or subscribe to my trading robots
Hello, I have three Expert Advisors and I want to prepare them to pass the MQL5 Market requirements in order to publish them. Note: I do not want any testing to be performed on the EAs. Also, one of the EAs needs a very minor change in the Info Panel — just modifying one line within that section only. Please let me know the cost and time required. Thank you
Apply with a screen of your work . Symbol Specific Logic . Live Chart Optimization Check the Core logic . [back tests as well] Change points to pips . Create buffer for the zone
Tengo una estrategia basada en divergencia para el oro sobre todo en tf m1 Basado en divergencia con stoch .. confirmando la entrada con ciertos parameteos de entrada Es mejor conversarlo para dar mejor los detalles Cuando entrar, porque o todas las divergencias se debe tomar para entrar en compras o ventas He adjuntado un ejemplo La confrmacion más exacta es el cruce de esos parámetros de stoch edebajo de level de
I WANT A TRADING ROBOT WITH GOLD STRATEGY THAT COULD TAKE ME TO 1MILLION$ TODAY,PLEASE KINDLY GENERATE THE BOT, DEBUGG COMPILE AND THEN GIVE ME WHEN EVER YOU ARE READY, ILL BE WAITING THANK YOU
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
Trade summary Plugin 200 - 500 USD
We are looking for a Plugin/ Dashboard for our Meta 5 which will act as a Risk Management/ information tool. the system will require to give real time summary of trades and P/L for certain groups
Hi, I am looking for an Quant/MQL5 developer to build a pure mathematical, Delta-Neutral Statistical Arbitrage (spot vs future ) Expert Advisor. ​ No retail indicator logic (No RSI, MACD, etc.). This is a high-speed, spread-based execution model trading the pricing inefficiency between two correlated assets (e.g., Gold Spot XAUUSD vs Gold Futures). ​ Core Requirements at a Glance: ​Real-time Spread & Z-Score
I need a professional MetaTrader 5 Expert Advisor based on a pullback trading strategy. Indicators: - Moving Averages: 5, 8, 13, 144 (custom, smooth like TradingView) - RSI (14) - ADX (14) with DI+ and DI- - OsMA (8, 21, 5) Strategy: Trend: - Use MA 144 to define the main trend Entry: - Trade only in trend direction - Wait for price to touch MA 8 - Confirm with: - RSI (above 50 for buy / below 50 for sell) - ADX >

プロジェクト情報

予算
30+ USD
締め切り
最高 5 日