Modification of Existing EA | Adding OR/ELSE IF Functions to Existing EA.

MQL4 Indicators Experts

Job finished

Execution time 9 days
Feedback from customer
A pleasure to work with, very patient and understanding & would have no problem working with Maxwell again.
Feedback from employee
I appreciate and am honored working with you. I look forward to more endeavors. Thank you.

Specification

I have an algorithm which is based on candlestick formations - specifically the hammer candle formation. 

Previously, the algorithm only executed short positions on bearish hammers & long positions on bullish hammers.

Now, however, I'm wanting to introduce inverse hammers, but keeping the wicks in the same positions (i.e., extended lower wicks for short positions and extended upper wicks for long positions)

It's not so much the interpretations of the global & local declarations themselves that are the issue, but it's the placement of the brackets that needs to be altered, as well as maybe introducing the "OR" or "ELSE IF" logic but I'll leave that up to you.

The instructions I'm needing it to follow - in layman’s terms - is the following:

"If '(BarTime != Time[0])' is true,
then assess if '(hammerHeadClose < hammerHeadOpen)' is True.
If (hammerHeadClose < hammerHeadOpen) is True, then assess if all of it's child statements are true. 
If all of its child statements are also True, then execute a position.

Alternatively (OR/ELSE IF) if '(hammerHeadClose > hammerHeadOpen)' is true, 
then assess if all of it's child statements are true.
If all of its child statements are true, then execute a position”.  

Therefore, if(BarTime != Time[0]) must always be TRUE, but dependant on weather  '(hammerHeadClose < hammerHeadOpen)' or '(hammerHeadClose > hammerHeadOpen)' will determine which set of child statements will be assessed to determine if a poition should be open.

Obviously (hammerHeadClose > hammerHeadOpen) & (hammerHeadClose < hammerHeadOpen) are mutually exclusive criteria (the closing price can either be above the opening or below the opening - doji's aren't allowed), there is no point in the EA assessing the child statements under (hammerHeadClose > hammerHeadOpen) when (hammerHeadClose < hammerHeadOpen) and visa-versa.

To put it another way "if(BarTime != Time[0]), assess "if(hammerHeadClose > hammerHeadOpen)". 
If "if(hammerHeadClose > hammerHeadOpen)" is FALSE (for example), go straight to if(hammerHeadClose < hammerHeadOpen) and assess all child statements here".

I hope this helps, if you need any clarification, let me know. 

The code in question is on line 315 (short position criteria) and line 795 (long position criteria).

I have enclosed documentation for the EA which includes the explanations to the Global Declarations which you will come across.


if(BarTime != Time[0])
     
     {
     
       if((hammerHeadClose < hammerHeadOpen)

         && (bearHammerHead >= Transform(candleBodyLength,2))
         && (bearHammerHandle!=0 && (bearHammerHead / bearHammerHandle) <= hammerHandlePct)
         && (bullRetracementCandle!=0 && (bearHammerHead / bullRetracementCandle) <= hammerHeadPct)
         && (bullRetracementCandle!=0 && (initialTrendBearCandle / bullRetracementCandle) <= retracePercentage)
         && (bullRetracementCandle >= Transform(candleBodyLength,2))
         && (trendFast < trendSlow)
         && (momentumFast < momentumSlow)
         && (NewBar)
         && (spread <= MaxSpread)
         && (hourOfDay >= startingHour && hourOfDay < endingHour)
         && (OrdersTotal()== 0))
         
       if((hammerHeadClose > hammerHeadOpen)

         && (bullHammerHead >= Transform(candleBodyLength,2))
         && (bearHammerHandleInv!=0 && (bullHammerHead / bearHammerHandleInv) <= hammerHandlePct)
         && (bullRetracementCandle!=0 && (bullHammerHead / bullRetracementCandle) <= hammerHeadPct)
         && (bullRetracementCandle!=0 && (initialTrendBearCandle / bullRetracementCandle) <= retracePercentage)
         && (bullRetracementCandle >= Transform(candleBodyLength,2))
         && (trendFast < trendSlow)
         && (momentumFast < momentumSlow)
         && (NewBar)
         && (spread <= MaxSpread)
         && (hourOfDay >= startingHour && hourOfDay < endingHour)
         && (OrdersTotal()== 0))
 
         {

         bool OpenShort = OrderSend(.....);

         /*----------code----------*/   
        /*----------code----------*/    
        /*----------code----------*/    

         }

}

Responded

1
Developer 1
Rating
(169)
Projects
204
30%
Arbitration
25
40% / 44%
Overdue
12
6%
Free
2
Developer 2
Rating
(3)
Projects
4
0%
Arbitration
2
0% / 100%
Overdue
1
25%
Free
3
Developer 3
Rating
(155)
Projects
239
70%
Arbitration
3
67% / 33%
Overdue
20
8%
Free
4
Developer 4
Rating
(203)
Projects
303
35%
Arbitration
56
38% / 38%
Overdue
99
33%
Free
5
Developer 5
Rating
(256)
Projects
415
38%
Arbitration
86
44% / 19%
Overdue
70
17%
Busy
6
Developer 6
Rating
(5)
Projects
11
18%
Arbitration
0
Overdue
3
27%
Free
7
Developer 7
Rating
(42)
Projects
47
30%
Arbitration
12
17% / 75%
Overdue
6
13%
Free
Similar orders
Connect from Mt5 via binary deriv account api I have mt5 indicator, need to connect with binary deriv account through api. If anyone can setup via API then contact me. everything control mt5
Hello I am looking for a developer to create an 50% retracement Indicator of the previous candle . So once a candle close the Indicator is supposed to take the full candle size from high to low and make a 61% and 50% level on that candle and I would like the candle to show until the next previous candle is done creating. After this I would look to create an ea with it possibly
Hi, I have 2 indicators which are based on the super trend , the alerts on indicator (1) does not work at all , and on the other indicator the alerts do not come on time on time, which is kind of delayed. see attached file below
Looking for an experienced developer to modify my existing TDI strategy , want to add filter for Buy and Sell Signals, Arrows are displayed on chart and what only to leave high accurate arrows Source code to be provided
I have the mq5 file, I need a buffer adding to the indicator, so it appears in the data window so I can reference it later in an EA. As the below screenshot shows, there is a median ray line from yesterday (the dashed horizontal line) - I want this value in the data window called Median Ray. I want this to be a single value per day, so todays Median Ray would be 17868, and so on each day. So I want all the Developing
I would like to develop my own indicator on metatrader 4 and tradingview. We would start with a basic version that we would improve later. It is an indicator based on several analyses and which would provide several indications. I am looking for someone who can develop on MT4 and Mt5, initially I would like to do it on mt4 and then on mt5. If you have expertise in pinescript it is a plus because I would like to
I urgently require swift assistance to convert a complex indicator into a fully functional scanner, capable of automatically sending real-time data, alerts, and notifications via email, ensuring seamless integration and prompt delivery of critical information to facilitate informed decision-making and timely action
I need to improve the code of an indicator that is too heavy and slow when running and when used with iCustom in an EA. No other changes to the indicator are requested: the original features of the indicator should remain as theay are. I'll provide the indicator after job acceptance. I request final source code mq5 file. Thank you Regards
I have a mt5 indicator that is working perfectly but I will like to make it an expert advisor to have an automated trade. I will be glad if I can get a well experienced developer to execute this project. Thanks
O TRABALHO CONSISTE NA MUDANÇA DO HISTOGRAMA DO INDICADOR TREDN DIRECTION AND FORCE DSEMA SMOOTHED PARA O HISTOGRAMA DA FOTO ANEXA, OBEDECENDO AS TRES CORES VERDE (UP, VERMELHOR(DOWN) E CINZA(TREND). O MESMO TEM QUE ODECER O MESMO CALCULO E COLORIR DA MESMA FORMA POREM COM HISTOGRAMA DDE FORMATO DIFERENTE

Project information

Budget
30+ USD
For the developer
27 USD