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

MQL5 Indicateurs Experts C# Forex

Tâche terminée

Temps d'exécution 2 heures
Commentaires du client
Couldn't fault the Developer, speedy, efficient, professional.
Commentaires de l'employé
Excellent. Happy to be of service.

Spécifications

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

Répondu

1
Développeur 1
Évaluation
(3)
Projets
4
0%
Arbitrage
2
0% / 100%
En retard
1
25%
Gratuit
2
Développeur 2
Évaluation
(139)
Projets
181
24%
Arbitrage
23
22% / 39%
En retard
13
7%
Gratuit
3
Développeur 3
Évaluation
(5)
Projets
11
18%
Arbitrage
0
En retard
3
27%
Gratuit
Commandes similaires
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

Informations sur le projet

Budget
30+ USD
Délais
à 5 jour(s)