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

MQL4 Indicadores Experts

Trabalho concluído

Tempo de execução 9 dias
Comentário do cliente
A pleasure to work with, very patient and understanding & would have no problem working with Maxwell again.
Comentário do desenvolvedor
I appreciate and am honored working with you. I look forward to more endeavors. Thank you.

Termos de Referência

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

         }

}

Arquivos anexados:

PNG
Slide1.PNG
15.5 Kb
PNG
Slide2.PNG
15.7 Kb

Respondido

1
Desenvolvedor 1
Classificação
(169)
Projetos
204
30%
Arbitragem
25
40% / 44%
Expirado
12
6%
Livre
2
Desenvolvedor 2
Classificação
(3)
Projetos
4
0%
Arbitragem
2
0% / 100%
Expirado
1
25%
Livre
3
Desenvolvedor 3
Classificação
(155)
Projetos
239
70%
Arbitragem
3
67% / 33%
Expirado
20
8%
Livre
4
Desenvolvedor 4
Classificação
(203)
Projetos
303
35%
Arbitragem
56
38% / 38%
Expirado
99
33%
Livre
5
Desenvolvedor 5
Classificação
(256)
Projetos
415
38%
Arbitragem
86
44% / 19%
Expirado
70
17%
Ocupado
6
Desenvolvedor 6
Classificação
(5)
Projetos
11
18%
Arbitragem
0
Expirado
3
27%
Livre
7
Desenvolvedor 7
Classificação
(42)
Projetos
47
30%
Arbitragem
12
17% / 75%
Expirado
6
13%
Livre
Pedidos semelhantes
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

Informações sobre o projeto

Orçamento
30+ USD
Desenvolvedor
27 USD