Arrow buffer for up, and for down + exit up, and exit down, with some binary buffers accompanying

MQL5 Experts

Job finished

Execution time 1 day
Feedback from customer
Absolutely exceptional. A new high standard is set.
Feedback from employee
thank you!

Specification

Arrow buffer for up or down


6-8 buffers.

Strategies for open, and close are defined within enums (two dummy strategies only required for job and have set these out below for you).

The reason for including enums is so that I can add strategies for open, and for close, and select them from within the indicator. This makes life simpler.

Note, not an EA, and not for trading, simply returns an on-chart arrow for "buy", for "sell" for "buy exit" And for "sell exit", and a corresponding "buy_signal_live" and "sell_signal_live" buffer which takes either 0 or 1, and resets to 0 after the exit is signalled.

Maintains a buffer for where we are in the trades, as below:


Buffer 0 → is 0 except where open_signal returns a ‘buy_arrow’ (1 period only) below the signal candle - "buy_arrow_buffer"

Buffer 1 → is 0 unless buy_arrow is present (1 period only) [[[NOTE YOU CAN COMBINE buffers 1 and 2 into one if simplifies]]]!!! 

Buffer 2 → is 0 unless ‘buy’ is currently active (more than 1 period)

Buffer 3 → is 0 unless ‘buy_exit’ is currently active (1 period only)


Buffer 4, 5, 6, 7 -as above, but for sell (note 5 and 6 can be combined into 1 buffer potentially - if it simplifies, then do it).


Input index = 1; //index candle is previous candle close (i.e. refreshes on bar open), if 0, then is current. Thjs is for when grabbing the data from buffers from handles, for the strategies

input number_of_trades_max_each_direction = 

Flow is as follows:

(1) Name open strategies as an enum

(2) Name close strategies as an enum

(3) Define [indicator] handles needed for open and close strategies

(4) Define rules for open strategies which return either "buy_arrow", "sell_arrow" or "nothing_" and also associated buy_signal_binary, buy_signal_live buffers

(5) Define rules for close strategies, which return either "buy_exit_arrow", "sell_exit_arrow" or "nothing_" and associated "buy_exit_binary" and "cancel_buy_signal_live..."

Define strategies using an enum

For this code, use:


enum open_strats {

RSI_Open_Strat,

CCI_Open_Strat

}


enum close_strats {

RSI_Close_Strat,

CCI_Close_Strat

}


//Define handles needed for strategies

//Handles needed for open_RSI


If open_strats == RSI… || close_strats == RSI..

handle_RSI = iRSI(....);

if(handle_RSI == INVALID_HANDLE) → log error

Etc

if open_strats == CCI || close_strats == CCI...

handle_CCI = iCCI(etc.);

if(handle_CCI == INVALID_HANDLE) → log error


//Strategies themselves 


if (open_strats == RSI_Open_Strat)


Values_Needed == 3;

Index == 1;

double bufferRSI[] = 0


Copybuffer(RSI, buffer0, index + Values_Needed-1,index); //Copy the RSI from period = index to period = ......

(or error)

//Get the data for the rules:

RSI0 = bufferRSI[index];

RSI1 = bufferRSI[index+1];


if (RSI1 < 60 && RSI0 >= 60) //Buy rule

return(Buy_Arrow)

also: buybuffer == 1 (for that period)

also: buybufferlive == 1 (continuously until exit - see below)


//Reverse for sell 

if (RSI1 > 40 && RSI0 <= 40) //Buy rule

return(Buy_Arrow)

also: buybuffer == 1 (for that period)

also: buybufferlive == 1 (continuously until exit - see below)


If RSI1 > 40 && RSI0 <= 40

return(Sell_Arrow)

+ sellbuffer == 1 (for that period)

+ sellbufferlive ==1 (continuously until exit - see below)


//Same principle for CCI, but use >50 (buy), <-50 (Sell)


//Exit strategies

//Exit is the opposite


If close_strats == RSI…

if RSI0 < 40

return (exit_buy)

--> buy_exit_buffer_arrow (1 period)

+ buy_exit_buffer_binary (1 period)

+ buy_signal_live (cancel back down to 0)


if close_strats == CCI


if CCI0 < -100

return(exit_buy)

if CCI0 > 100

return(exit_sell)

+ sell_exit_buffer_arrow

+ sell_exit_buffer_binary

+ sell_signal_live (cancel back down to 0)




Responded

1
Developer 1
Rating
(146)
Projects
172
23%
Arbitration
7
29% / 43%
Overdue
4
2%
Loaded
2
Developer 2
Rating
(31)
Projects
41
20%
Arbitration
9
11% / 89%
Overdue
5
12%
Free
Similar orders
Hello, I want to create an EA that can be able to take and optimise trade bids using the trend tracker concept I have developed. The tracker will monitor 2 lines to determine the trend of the market and afterwards take bids towards the correct direction. It will also be able to use a distance between the bids for the direction of the trend and plan a reverse bid when the price of the extreme doesn’t change again. The
Gradient boosting and L2 100 - 200 USD
I am looking for a well experienced programmer to put/implement a gradient boosting algorithm and an L2 to reduce overfitting in my ea which l already have which uses indicators . If you are experienced please adhere
Hello, I'm looking for a developer for repair calendar in EA MT4/MT5 (News Filter - https://ec.forexprostools.com ) for all windows servers. Note: EA MT4/MT5 works with calendar on PC Win 10, 11 but not on all windows servers. I have the source code and will post within the comments section for review. If you are able to do this and quality. Please apply. Thanks
Create mt4 ea 50+ USD
To convert the provided MT4 indicator script into an Expert Advisor (EA) and implement prompt functionality for user input, we need to modify the code to handle external parameters and provide a user-friendly interface. Below is the EA code that incorporates prompts for user inputs
SCALP MARTINCALE SPY TIMEFRAME 1MIN CANDLE - SHORT SIDE ONLY 1-SET RISK : A IS A VARIABLE (HOW MUCH $) 2-SET ATR(3) : SET THE TIME AT WHICH THE ATR SHOULD BE TAKEN, IF SET 933AM THEN THE ATR OF THE 1MIN CANDLE AT 933AM CANDLE WILL BE USED (ROUND AT 0.25 UP OR DOWN) *USE NEW YORK TIME 3-SET MAX NUMBER OF ENTRY : B IS A VARIABLE 4-SET RSI(14) / C IS A VARIABLE, IF RSI(14) > C = ORDERS OPEN 5-IF RSI(14) > C IS TRIGGERED
I WRITE a code i want to conect this for automatic trading through vps .and als advanced features for this code .i attached afile please watch .and give me perfect ea
Hello, I need a martingale and grid bot. The programmer must provide a test of about 5 minutes for the EA to see how it works and if everything is fine, it will be selected to make some modifications for personal use to that EA that you provide. If it has a lot of graphics or buttons. better It doesn't matter if the robot is bad, I'm more interested in its functionalities to use with my strategy
Hi Developer, I would like to create the Scalping EA based for Mt4 on the investing.com data https://www.investing.com/currencies/eur-usd-technical EA have timing to adjust time to trade. follow the broker time. From starting time to end time EA have a adjustable Lot size (0.01 incremental to 0.01) EA have a adjustable TP (1pip to 100pip incremental 1pip) EA have a adjustable SL (1pip to 100pip incremental 1pip) EA
Here is the Idea: I want a Semi Auto Trade Panel Manager EA that only activates when I press the BUY or SELL or BUY LIMIT or SELL LIMIT then the EA will do the rest : that includes the BUY STOP 0r SELL STOP and the hedging calculations according to below diagram. So overall , my only intervention is entering the lot size , hedge zone distance and TP ratio or entering the price for buy limit/sell limit then pressing
Hi, I'm looking for a martingale MT4 EA that performs a lot of trading volume per day. If you have the robot, you'll need to send me the demo so I can backtest it. Thank you very much

Project information

Budget
30 - 50 USD
For the developer
27 - 45 USD
Deadline
from 1 to 2 day(s)