EA in MQL4 using simple candle pivot patterns

Experts

Job finished

Execution time 1 day
Feedback from employee
thank you, good work.

Specification

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"

Responded

1
Developer 1
Rating
(41)
Projects
124
34%
Arbitration
32
13% / 75%
Overdue
53
43%
Free
Similar orders
Signal for mt5 30+ USD
A signal to buy or sell gold arrives into a telegram group which needs to be executed immediately on MT5. there will be a range in which more layers will need to be added if price goes opposite to the signal direction and and there will be an SL and 3 TPs they will need to added to each layer. There will be further messages sent to say set SL to BE which will need to be executed at also which point a few trades
Hello, I currently have a custom script developed on TradingView, and I’m looking to have it converted for use on cTrader. My goal is to transition the strategy from the TradingView platform to cTrader while preserving all of its core functions and logic. The script includes specific technical indicators, strategy rules, and alerts that are essential to my trading approach. Since cTrader uses C# for its cAlgo
I have a TradingView script that I would like to convert into a cTrader script. The script contains various indicators and strategies that I use on TradingView, and I want to implement the same functionality in cTrader to use it for live trading or backtesting. I’m familiar with the TradingView platform and its capabilities, but I need help translating the code into C#, which is the programming language used for
Hi, i have a simple pinescript strategy and i need to convert it to mt5 and get the full code available. The idea of the trading system is as follows : check the opening price of the candle at Hour "CheckpointHour_start" and opening price of the candle at Hour "CheckpointHour" calculate ATR of the previous "AtrLenghtShort" and "ATRLenghtLong" periods use ATR short as TP/SL values multiplying it by factors "LV SL
Custom strategy 30+ USD
I run a trading discord and I have a plan for something related to a script/signal but I have no idea how realistic it is as im not very educated on anything in that realm. If I ran and idea by you , could you anyone me if its a service you can provide? and im wondering if pieces of that strategy can be turned into discord channel alerts rather than a tradingview signal if that makes sense
Project Description: Convert TradingView Pine Script Strategy to MT5 Expert Advisor (EA) Main EA Logic: Convert my existing TradingView Pine Script Strategy into an MT5 Expert Advisor (EA). The EA must replicate the exact same logic and behavior of the TradingView strategy, including identical backtest results across all timeframes and market conditions. With Smart Lot Size Calculation Based on Fixed USD Risk Per
Additions to my EA 30 - 100 USD
I have a complex code (over 5000 lines) and would like to make some changes. First I would like to add four additional patterns to my EA well two for sell and two for buy. pattern but the entry criteria is different. Single Timeframe HULK Signal Concept The HULK signal is based on the principle of no wick on one side of the candle , meaning: The market opened at the extreme (high or low) Then moved only in one
Dear Sir or Madam, I am commissioning the complete overhaul of the attached MQL5 code within the framework of a fixed budget . The goal is to deliver a stable, profitable, and maintainable Expert Advisor that is specifically optimized for structured testing within the MetaTrader 5 Strategy Tester . This initial assignment serves primarily to evaluate your capabilities. For future project phases, I intend to establish
Create a bot that reads trading signals from Telegram. - Ensure the bot can execute trades automatically on the MT5 platform. I need something that will be robust and that has been back tested for success. The Bot will need to execute immediately upon reading the telegram signals and execute moving SLs to breakeven and closing trades as well depending on what messages have been sent. A signal to buy or sell gold
I have a TradingView script that I would like to convert into a cTrader script. The script contains various indicators and strategies that I use on TradingView, and I want to implement the same functionality in cTrader to use it for live trading or backtesting. I’m familiar with the TradingView platform and its capabilities, but I need help translating the code into C#, which is the programming language used for

Project information

Budget
15 - 30 USD
For the developer
13.5 - 27 USD
Deadline
from 5 to 10 day(s)