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

MQL4 Indicateurs Experts

Tâche terminée

Temps d'exécution 9 jours
Commentaires du client
A pleasure to work with, very patient and understanding & would have no problem working with Maxwell again.
Commentaires de l'employé
I appreciate and am honored working with you. I look forward to more endeavors. Thank you.

Spécifications

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----------*/    

         }

}

Répondu

1
Développeur 1
Évaluation
(169)
Projets
204
30%
Arbitrage
25
40% / 44%
En retard
12
6%
Gratuit
2
Développeur 2
Évaluation
(3)
Projets
4
0%
Arbitrage
2
0% / 100%
En retard
1
25%
Gratuit
3
Développeur 3
Évaluation
(155)
Projets
239
70%
Arbitrage
3
67% / 33%
En retard
20
8%
Gratuit
4
Développeur 4
Évaluation
(203)
Projets
303
35%
Arbitrage
56
38% / 38%
En retard
99
33%
Gratuit
5
Développeur 5
Évaluation
(256)
Projets
415
38%
Arbitrage
86
44% / 19%
En retard
70
17%
Occupé
6
Développeur 6
Évaluation
(5)
Projets
11
18%
Arbitrage
0
En retard
3
27%
Gratuit
7
Développeur 7
Évaluation
(42)
Projets
47
30%
Arbitrage
12
17% / 75%
En retard
6
13%
Gratuit
Commandes similaires
EA DEJA FABRIQUE ? MODIFIER QUELQUE LIGNE POUR LE RENDRE RENTABLE /////////////////////++++++++++++++++++++++++++++++++++ EA AVEC UN SYTEME SIMPLE ; SEULEMENT A MODIFIER %%%%%%%%%%%%%%%%%% SI PERSONNE SACHANT CODER CORRECTEMENT , CE TRAVAIL EST POUR TOI
Buy an sell symbols and guide showing entry to buy or sell setups and I need it gives and tell me to enter buy or to enter sell by automation nnnnnnnnnn fgggghhuuuiijh hhrddfhuuufffff yygggg hhgt hiidcb hygdfbby gyytdv uttrdd. Httdd hyyydv. Yhygf. Uu juhgff uyttt uuuytdbhy uuuyyy hhhff jjueeiivhgffdgu hyuu7trg yyyyffj yyytd u6tttf uuyrrrhi uytrrfh utterly jyrfgkkttv uhyybhhyy hytfgivuyt utfbh utghjio7t. Uuytg uytru
Utilizing the MQL5 MetaEditor Wizard, I created an Expert Advisor, having the following Signal indicators: I was able to optimize the EA and reached a backtest with the following specifications: I was able to reach a profit level of 30K, as indicated below. However, the Bot is not without faults and following the backtest, I started a forward test with real live data and the results were not so great. The EA took a
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

Informations sur le projet

Budget
30+ USD
Pour le développeur
27 USD