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

MQL5 指标 专家 C# 外汇

工作已完成

执行时间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%
空闲
相似订单
Hello, i would like to have a ninjatrader indicator. I wanna to have a footprint indicator with delta, imbalances and big trades identifiable. Also I wanna sell it on whop. And it should be fully customisable in NT8
I would like to program a ninja trader strategy that involves a Cycle ID indicator. Can you take a look to see if you can program the indicator in a strategy? Let me know if you can do this
Hello, I have a Ctrader indicator with the source code, I was wondering if this possible to convert it to Quantower. Hello, I have a Ctrader indicator with the source code, I was wondering if tis possible to convert it to Quantower., i need an expert who can convert it perfectly
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
Hi i need an expert to built a automated trading bot for ninja trader platform like sniper auto trader bot If you can develop or build automated bot for ninjatrader, let me know
Early Killer EA 30+ USD
It must have automated stop loss. Something that can end poverty and kill the market early.It must take the trades for me whenever I start it it must work on tradeport ea

项目信息

预算
30+ USD
截止日期
 5 天