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
(287)
Projects
359
29%
Arbitration
37
27% / 65%
Overdue
10
3%
Working
Published: 10 codes
2
Developer 2
Rating
(31)
Projects
41
20%
Arbitration
9
11% / 89%
Overdue
5
12%
Free
Similar orders
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
Ea which is based on the price returning to the open or close of a 1-minute candle or zone of candles. panel on chart need too have buttons : trainding on/off close all close profit add buy stop add buy limit add sell stop add sell limit ( all to existing setups) calculating profit/loss for a single open setup and in total in account currency calculating profit/loss for a single open setup and in total in percentage
Hi, I’m looking for an experienced MQL5/MT4 developer to work on a trading BOT project. I currently have an MT4 demo environment with IC Markets for testing, but the complete strategy specifications have not yet been provided. I’d like you to first review the available project/BOT information and let me know what you would need to configure, develop, and properly forward-test it. The testing should cover entries

Project information

Budget
30 - 50 USD
Deadline
from 1 to 2 day(s)