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

MQL4 지표 전문가

작업 종료됨

실행 시간 9 일
고객의 피드백
A pleasure to work with, very patient and understanding & would have no problem working with Maxwell again.
피고용인의 피드백
I appreciate and am honored working with you. I look forward to more endeavors. Thank you.

명시

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

         }

}

응답함

1
개발자 1
등급
(169)
프로젝트
204
30%
중재
25
40% / 44%
기한 초과
12
6%
무료
2
개발자 2
등급
(3)
프로젝트
4
0%
중재
2
0% / 100%
기한 초과
1
25%
무료
3
개발자 3
등급
(155)
프로젝트
239
70%
중재
3
67% / 33%
기한 초과
20
8%
무료
4
개발자 4
등급
(203)
프로젝트
303
35%
중재
56
38% / 38%
기한 초과
99
33%
무료
5
개발자 5
등급
(261)
프로젝트
425
38%
중재
86
44% / 19%
기한 초과
71
17%
로드됨
6
개발자 6
등급
(5)
프로젝트
11
18%
중재
0
기한 초과
3
27%
무료
7
개발자 7
등급
(42)
프로젝트
47
30%
중재
12
17% / 75%
기한 초과
6
13%
무료
비슷한 주문
I have a indicator, mql file. The signals are seen below on a EURNZD H1 chart. Very important to get accurate entries. The signal to trade is the first tic after the the indicator signal paints. I've tried to demonstrate that below. Other than that the EA will have a lot size escalation, an on-screen pip counter, a button to stop taking new trades, SL/TP, and magic number. I would like the indicator to be within the
I would like to create an EA based on the Shved Supply and Demand indicator. you can find the Shved Supply and Demand v1.7 indicator in the following link https://www.mql5.com/en/code/29395 NB: Checks the trading robot must pass before publication in the Market ( https://www.mql5.com/en/articles/2555 ) MQ5 file to be provided
Im looking for an coder to code an EA: Trade management 1. opening trades according to the indicator 2. trades settings to choose from like: open all trades according to the signal open only trade 1,2,3 or 4 % per trade ( example 50/30/20 of the lot settings, with 4 trades it would be for example 50/30/10/10) 3. SL/Trailing settings: Move SL to entry after hitting TP1/TP2 or TP3 moving SL by % keep the original SL
Hi I'm looking to have 2 of my pinescript strategies converted to MQL5 and was wondering if you could first give me a quote for the more simple strategy and then for both the simple and complex strategy together. The simple strategy is a MACD crossover type thing that uses a special EMA script that filters out some ranging price action and also fractal candles for the stop loss. The second strategy is market
I want grate robot for making profits that know when to start a good trade and close a trade and must be active all time to avoid lost of money
I have developed a very strong TradingView strategy in Pine Script but unfortunately, a third-party connector is requiired and in my opinion, I want a more direct connection. I am not brilliant at coding, but I have coded the majority of the MT5 code and I would like you to make sure that the MT5 code matches my TradingView script and executes the same way as the TradingView script that I will provide if you are
Mbeje fx 50+ USD
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Dr Pattern 30+ USD
good day i need the service of the seaso coder to help me fix my ea The Job required 1 knowledge of Mt4 and Mt5 indicator coding 2. Telegram code 3. ability to code indicator to work on multiple Time frame combine to trade 4 Ability to Join two or three indicator on same ir different time frame if you have these skill please let chart i will discuss the details of the Job inside to you The required day including
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks

프로젝트 정보

예산
30+ USD
개발자에게
27 USD