I am new here and trying to figure this all out. Any help will be greatly appreciated.
I want trying to make an EA that will look at the last 4 candlesticks and identify if they closed higher or lower than the previous one. If all 4 are the same then indicate a buy or sell.
Example:
C0 would be live
C1 would be one minute old closed at 100
C2 would be two minutes old closed at 105
C3 would be three minutes old closed at 110
C4 would be four minutes old closed at 115
then sell at C0
C1 closed at 115
C2 closed at 110
C3 closed at 105
C4 closed at 100
then buy at C0
C1 closed at 115
C2 closed at 100
C3 closed at 105
C4 closed at 100
or any combination that is not all in one direction then hold
In essence want to make something that looks like the below, the colors and lines would be cool but not necessary.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello all,
I am new here and trying to figure this all out. Any help will be greatly appreciated.
I want trying to make an EA that will look at the last 4 candlesticks and identify if they closed higher or lower than the previous one. If all 4 are the same then indicate a buy or sell.
Example:
C0 would be live
C1 would be one minute old closed at 100
C2 would be two minutes old closed at 105
C3 would be three minutes old closed at 110
C4 would be four minutes old closed at 115
then sell at C0
C1 closed at 115
C2 closed at 110
C3 closed at 105
C4 closed at 100
then buy at C0
C1 closed at 115
C2 closed at 100
C3 closed at 105
C4 closed at 100
or any combination that is not all in one direction then hold
In essence want to make something that looks like the below, the colors and lines would be cool but not necessary.