EA in MQL4 using simple candle pivot patterns

전문가

작업 종료됨

실행 시간 1 일
피고용인의 피드백
thank you, good work.

명시

The idea:

To begin with this strategy has been tested with IT-charts backtesting method and gives about 50-50 of the trades either on the profit or the loss site. However the profitable trades generate around three times more profit than the loosing trades are causing losses. The end result gives a net profit after 3 months ideally (if all signals are executed at the very time they come out) at 2500 points given that all positions are open as 1. The method has been used for about a month for trading with DJIA and Forex (EUR/USD) at 2 hours and 4 hours charts respectivelly and due to practical reasons (i.e. not being able to execute all signals) ended up with lower profits than expected at around 400 points. The main problem as with many strategies is that an average person can not follow all signals as these are coming out on a 24/hour-basis.

The method is based on simple 3, 4 and 5 candle set patterns and defines a bearish or a bullish pivot points (trend reversal).

Example of 3 candle sets: (The candles are numbered as 2-1-0 with the 0 being the most recent one). We have a bullish pivot point whereas candle 1 has lower low than candle 2 and candle 1 has lower high than candle 2 and candle 0 crosses over the high of candle 1. The program should automatically exit all short positions should there are any open and automatically open a long position at the time of crossing without any manual intervention. Of course the reverse (i.e. sell all long positions and sell short simultaneously should be executed in case of a bearish signal).

I can provide all help that might be needed so that the developer gets a clear picture of what is needed. Please also see below the rules that I wrote in IT-chart build-in language if that helps.


The rules I am using in the IT-charts custom indicator, in case they are of any help are as follows:

ONCE S3 = 0
ONCE S4 = 0

ONCE S5 = 0


//NOTE: S3, S4 and S5 are sets of 3, 4 and 5 candles respectively

//NOTE: Values of the above can only take the values of 1 (for bullish, - 1 for bearish, or 0 (for no signal).

//NOTE: The following code defines the rules based on highs and lows of the involved candles:


IF LOW[0] < LOW[1] AND LOW[1] > LOW[2] AND HIGH[0] < HIGH[1] AND HIGH[1] > HIGH[2] THEN
    S3 = -1
ELSIF LOW[0] > LOW[1] AND LOW[1] < LOW[2] AND HIGH[0] > HIGH[1] AND HIGH[1] < HIGH[2] THEN
    S3 = 1
ELSE
    S3 = 0
ENDIF

IF LOW[0] < LOW[1] AND LOW[3] < LOW[1] AND HIGH[0] < HIGH[1] AND HIGH[3] < HIGH[1] AND HIGH[2] < HIGH[1] AND LOW[2] > LOW[1] THEN
    S4 = -1
ELSIF LOW[0] < LOW[2] AND LOW[3] < LOW[2] AND HIGH[0] < HIGH[2] AND HIGH[3] < HIGH[2] AND HIGH[1] < HIGH[2] AND LOW[1] > LOW[2] THEN
    S4 = -1
ELSIF LOW[0] > LOW[2] AND LOW[3] > LOW[2] AND HIGH[3] > HIGH[2] AND HIGH[0] > HIGH[2] AND HIGH[1] < HIGH[2] AND LOW[1] > LOW[2] THEN
    S4 = 1
ELSIF LOW[0] > LOW[1] AND LOW[3] > LOW[1] AND HIGH[0] > HIGH[1] AND HIGH[3] > HIGH[1] AND HIGH[2] < HIGH[1] AND LOW[2] > LOW[1] THEN
    S4 = 1
ELSIF LOW[0] < LOW[2] AND LOW[3] < LOW[2] AND HIGH[0] < MAX(HIGH[2],HIGH[1]) AND HIGH[3] < MAX(HIGH[2],HIGH[1]) AND LOW[1] = LOW[2] AND HIGH[0] < MAX(HIGH[1],HIGH[2]) THEN
    S4 = -1
ELSIF LOW[0] > MIN(LOW[1],LOW[2]) AND LOW[3] > MIN(LOW[1],LOW[2]) AND HIGH[0] > HIGH[1] AND HIGH[3] > HIGH[1] AND HIGH[2] = HIGH[1] AND LOW[3] > MIN(LOW[1],LOW[2]) THEN
    S4 = 1
ELSE
    S4 = 0
ENDIF

IF LOW[0] < LOW[2] AND LOW[4] < LOW[2] AND HIGH[0] < HIGH[2] AND HIGH[4] < HIGH[2] AND HIGH[1] < HIGH[2] AND HIGH[3] < HIGH[2] AND LOW[1] > LOW[2] AND LOW[3] > LOW[2] THEN
    S5 = -1
ELSIF HIGH[0] > HIGH[2] AND HIGH[4] > HIGH[2] AND LOW[0] > LOW[2] AND LOW[4] > LOW[2] AND LOW[1] > LOW[2] AND LOW[3] > LOW[2] AND HIGH[1] < HIGH[2] AND HIGH[3] < HIGH[2] THEN
    S5 = 1
ELSIF HIGH[1] > HIGH[0] AND HIGH[1] > HIGH[4] AND LOW[1] > LOW[0] AND LOW[1] > LOW[4] AND HIGH[2] < HIGH[1] AND HIGH[3] < HIGH[1] AND LOW[3] > LOW[1] AND LOW[2] > LOW[1] THEN
    S5 = -1
ELSIF HIGH[3] > HIGH[0] AND HIGH[3] > HIGH[4] AND LOW[3] > LOW[0] AND LOW[3] > LOW[4] AND HIGH[2] < HIGH[3] AND HIGH[1] < HIGH[3] AND LOW[1] > LOW[3] AND LOW[2] > LOW[3] THEN
    S5 = -1
ELSIF LOW[1] < LOW[0] AND LOW[1] < LOW[4] AND HIGH[1] < HIGH[0] AND HIGH[1] < HIGH[4] AND HIGH[2] < HIGH[1] AND HIGH[3] < HIGH[1] AND LOW[2] > LOW[1] AND LOW[3] > LOW[1] THEN
    S5 = 1
ELSIF LOW[3] < LOW[0] AND LOW[3] < LOW[4] AND HIGH[3] < HIGH[0] AND HIGH[3] < HIGH[4] AND HIGH[2] < HIGH[3] AND HIGH[1] < HIGH[3] AND LOW[2] > LOW[3] AND LOW[1] > LOW[3] THEN
    S5 = 1
ELSE
    S5 = 0

ENDIF


// The following part of the code checks the crossing event and gives the price at which the order should be executed. P for price.


ONCE P = 0

IF S3 = 1 THEN
    P = HIGH[1]
ELSIF S3 = -1 THEN
    P = LOW[1]
ELSIF S4 = 1 THEN
    P = MAX(HIGH[1],HIGH[2])
ELSIF S4 = -1 THEN
    P = MIN(LOW[1],LOW[2])
ELSIF S5 = 1 THEN
    P = MAX(MAX(HIGH[1],HIGH[2]),HIGH[3])
ELSIF S5 = -1 THEN
    P = MIN(MIN(LOW[1],LOW[2]),LOW[3])
ELSE
    P = 0
ENDIF

RETURN S as "signal", P AS "PRICE OF SIGNAL"

응답함

1
개발자 1
등급
(41)
프로젝트
124
34%
중재
32
13% / 75%
기한 초과
53
43%
무료
비슷한 주문
I would need a robot that will automatically enter buy and sell positions based on the renko chart. The trend is to be determined on the basis of Elliot Waves. Individual peaks and troughs are determined by the TMA centerband Indicator. The buy position is entered when a higher low appears via the buy signal of the TMA indicator A sell position is entered when a lower high appears via the sell signal of the TMA
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity
The idea of the trading system is as follows : market entries are performed when MACD's main and signal lines intersect in the current trend direction . 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is
Modify My EA 30+ USD
good day coder i want to add additional indicator to my ea The Coder should be able to code indicator to EA i will only send you source code if you can proof the indicator can be coded into ea all other features will be discussed inside but the major part is this peculiar indicator i am available for discussion My time zone is GMT+1 Source code will be release and tested on live market i trade from monday to sunday
Hello , By slippage control on Take profit and stoploss functions the ea won't implement different results of TP and Stoploss on volatile markets, target is to produce exact numbers of sl and tp on live executions .A coder who has done this type of job will be the choice . lot sizing will be added to EA
Use indicator provided to produce support and resistance levels, and enter trade if price reaches s/r level which user has specified in settings. TP and SL should also come from user settings. TP and SL options should be s/r levels. EA trade should only be opened if there is a trade already open from another EA, based on magic number. EA should check for magic number from other EA, and only enter trade if there is a
1. Idea uruchomienia jest następująca : wejście na rynek ma miejsce, gdy główna linia MACD przecina się z linią sygnałową zgodnie z aktualnym uruchamianiem trendu . 2. Trend jest ustalany na podstawie średniej kroczącej wykładniczej z określonym okresem (InpMATrendPeriod). Jeśli bieżąca wartość EMA jest większa od sieci, trend jest postrzegany jako rosnący (ema_current > ema_previous). Alternatywnie, jeśli
Hello, Need to create an EA solely based on an indicator. Will provide the indicator, which is just available on the market. The EA will just trade based on the signals and close trades based on my parameter
So, I have the attached include and ex files (which I got from online. I cannot remember the time and where though). I would like you to edit it to fit something I have and use in excel. What I want is that I want to specify these main parameters: 1. Number of trades (I do not think it should be difficult but If it will be too complex and challenging, then you can set number of trades to just 3). That is fine 2
Hello. I would features added to an EA I have made for an indicator I purchased; "PZ Day Trading Indicator", for indicator buffers and other information you can find it here in the "developer" tab https://www.pointzero-trading.com/en/Products/view/PZDayTrading I cannot provide you with the indicator due to licensing, you can download the demo version on the market, and we will have to work in a produce -> test ->

프로젝트 정보

예산
15 - 30 USD
개발자에게
13.5 - 27 USD
기한
에서 5  10 일