Checking Previous candles in EA to make sure they got the wanted signals to open the trade at the current candle

MQL4 Experts

Job finished

Execution time 6 minutes
Feedback from customer
Very polite and responsive. And also very talented.
Feedback from employee
Very Nice Customer, thanks and godd luck ...

Specification

Hi friends. I hope that you are fine. I built an strategy and I want to make an EA of it. I've already written the basic code, but I have a problem that I will explain:

I'll attach a picture to this post showing the indicator's results of my strategy with arrows up and down. In this picture you will see four  vertical lines. I'll tell you what those lines mean. The blue line is on the candle that shows an arrow up after its last arrow which is down with a red vertical line on the candle. The candle after the candle which has a blue vertical line is my long entry. My exist will be the candle after the candle which has an arrow down and a brown vertical line on it. Also notice that the last arrow is an up one which is on the candle with a green vertical line. At the exit, I want to open a short position too, and exit when a candle after the candle which an arrow up appears on it; And not to mention that there's an arrow down before it. And here again is a long position entry and this cycle goes on and on. I want to check previous candles to see two candles; one with arrow up after the one with arrow down, and vice versa, to make a new position at the current candle and also close the last position.

So basically if the 2nd last arrow was down (candle 1) and the last arrow was Up (candle 2) then buy on the open of the current candle and close the last (obviously sell) trade.

When 2nd last arrow up (candle 1) and last arrow Down (candle 2) then on current candle's open: close the last (obviously buy) trade and open new Sell trade.

I'll also share you my source code with you, but it's lacking the conditions of my buy and sell signals, for obvious reasons.

If you have additional question, don't hesitate to ask me :)

Files:

PNG
Screenshot.png
128.2 Kb

Responded

1
Developer 1
Rating
(772)
Projects
1039
44%
Arbitration
50
8% / 50%
Overdue
116
11%
Free
2
Developer 2
Rating
(137)
Projects
167
35%
Arbitration
11
91% / 0%
Overdue
0
Free
3
Developer 3
Rating
(457)
Projects
724
34%
Arbitration
35
71% / 9%
Overdue
23
3%
Free
4
Developer 4
Rating
(298)
Projects
427
26%
Arbitration
18
61% / 33%
Overdue
26
6%
Free
Published: 8 codes
5
Developer 5
Rating
(258)
Projects
396
28%
Arbitration
70
19% / 49%
Overdue
121
31%
Working
6
Developer 6
Rating
(117)
Projects
138
41%
Arbitration
30
7% / 77%
Overdue
17
12%
Free
7
Developer 7
Rating
(277)
Projects
334
55%
Arbitration
14
36% / 29%
Overdue
1
0%
Free
8
Developer 8
Rating
(515)
Projects
554
53%
Arbitration
13
69% / 15%
Overdue
3
1%
Free
Similar orders
Trading bot ea 30+ USD
yoo i want to make a trading bot i have my strategy in videos and also the rules to if anyone can work it out for me i will be glad welcome your bid and it urget let connect here on mgl5 And if you know you can not do the project without getting paid first please don't bid thanks
MT5 EA make work on zone break and candle confirm. Hi i need one expert person who can make exact what i want. My EA logic very simple.... few hrs market high and low make line then candle body close above or low then candle confirmation then pullback then entry RR1:2 no trail nothing,,,,, the line high low create after few hrs of the day i wll tell you later,,,,then 1hrs no trade if break then no trade for the
Hi, I need an Expert Advisor (EA) for MetaTrader 5, for my IC Markets account. Account MT5, hedging account, type: [Raw Spread / Standard: fill in] Deposit: 100 USD, leverage 1:30, account currency: [USD / EUR: fill in] Instruments Forex (major pairs) and gold (XAUUSD) Strategy and parameters may differ per instrument; each instrument must be tested and optimized separately If an instrument cannot be traded safely
المطلوب موشر لتداول الذهب مجرب وقوية يعطي اشاره قوية فقط مع وقف خساره ومختبر ومجرب في حال الموافقه علي لموشر بعد التجربه لمدة ٣ ايام يتم الشراء دايم مبلغ ٢٠٠ دولار
Masoudahg1 999999+ USD
Hello world, thank you for your helping and supporting for us from your for all everyone that investments or working in this programing and supporting seven/24 hours in daily and nightly for customers
Laily Mahmudy 100000+ USD
Thank you very much and of trying supporting and helping for us and my investfolio portfolio id is:"investfolio portfolio masoudahg1 id is":"7Zk0iVh7zuytHkQ9OJSzeY" &"35VmgKWofZxWowQ7O6CL8K" https://leylimahmudi46.atlassian.net is my Atlassian programing that when I working of this programs
Hi there I need someone who will create an ea then test it .. the ea should only place order on the bid price of it breakout in 1 point using invisible buy and invisible sell,, example if bid breakout in 1 point up automatically invisible buy active then invisible stop loss at where the ask price was same in sell If the bid breakout in 1 point down automatically invisible sell active then invisible stop loss where
I’m looking for an experienced MT5/MQL5 freelancer to help install and configure several existing EAs on IC Markets MT5 accounts using a Windows VPS. The work will include setting up the EAs on separate demo accounts and later running several together on one account with different risk settings. I also need help with MT5 backtesting and strategy optimisation, including comparing different risk levels and reviewing
I am looking for someone to build me a modular auto trader in Sierra chart and an Innie builder so that I can replicate my current Algas that I already have built. I've sent examples below can you please let me know how much you would charge me. I'm pretty good at building the signals myself but I do not know how to build the ocos order entry and I'm trying to get quotes and go with the person who seems they can help
i need price action and candle logic understand programmer need for this job... first understand logic and interested please message .... first understand logic and interested please message .... 2 types of hedge entry conditions: 1 is candle based 1- when i start point ea hh candle buy entry, after ll made 2- below the previous candle hedge sell order 3- if market goes again hh, if sell order profit book again

Project information

Budget
30+ USD
Deadline
from 1 to 4 day(s)