Simple modification existing MQL4 indicator an making expert – new conditon based on BB, Fractal and Candles in a Row

MQL4 Indicators Experts

Specification

Heloo my friends,


I have an indicator and I want to put new simple conditions for BUY and SELL signal and make expert advisor.



Rules For Buy Signal


------- Bollinger Bands Rules - the user chooses the option (yes / no) ------------

1 Signal candle - it touches the Bottom Bollinger Band line (yes / no) - the user chooses the option
2 Minimum distance to the Upper Bollinger bands line in relation to the signal candle size - the user enters the minimum distance size in percent
   - if I put 0.4 it means that distance to Upper BollingerBand Line is 40% percent of candle size (high i low) - if size of main candle is 100 points- min distance to Bollinger Band UP bands is than 40 points for Buy signal 
3 Maximum distance to the Upper Bollinger bands - same as the previous explanation



----------- Maximum number of same candle in a row - - the user chooses the option (yes / no) ------------

Maximum number (external input) of Berish candles in a row in the last x candle (external input) for Buy Signal


-------------------- Size of signal candle ------------------------------
SizeSignalCandleMax    = 5 (if I put 5 it means that the size of signal candle is highest in the last 5 bars)



----------- Fractal Rules -  the user chooses the option (yes / no) ------------

For Buy Signal Looking Only Fractal above of the High of signal candle
The distance to the nearest fractal in relation to the signal candle size - the user enters the minimum distance size in percent
   = if I put 0.4 it means that distance to nearest fractal is 40% percent of candle size (high i low) - if size of main candle is 100 points- min distance to nearest fractal is than 40 points  
The value of nearest fractal is in the shadow of the signal candle (Shadow of BUY candle = High - Close of signal candle) - the user chooses the option (yes / no)
   = If Not means that Nearest Fractal is not in the shadow of the candle






Rules For Sell Signal


------- Bollinger Bands Rules - the user chooses the option (yes / no) ------------

1 Signal candle - it touches the Upper Bollinger Band line (yes / no) - the user chooses the option
2 Minimum distance to the Bottom Bollinger bands line in relation to the signal candle size - the user enters the minimum distance size in percent
   - if I put 0.4 it means that distance to Upper BollingerBand Line is 40% percent of candle size (high i low) - if size of main candle is 100 points- min distance to Bollinger Band UP bands is than 40 points for Buy signal 
3 Maximum distance to the Bottom Bollinger bands - same as the previous explanation



----------- Maximum number of Bulish candle in a row - - the user chooses the option (yes / no) ------------

Maximum number (external input) of Bulish candles (Close>Open) in a row in the last x candle (external input) for Buy Signal


-------------------- Size of signal candle - the user chooses the option (yes / no) ------------------------------
SizeSignalCandleMax    = 5 (if I put 5 it means that the size of signal candle is highest in the last 5 bars)


----------- Fractal Rules -  the user chooses the option (yes / no) ------------

For Sell Signal Looking Only Fractal Below of the Low of signal candle
The distance to the nearest fractal in relation to the signal candle size - the user enters the minimum distance size in percent
   = if I put 0.4 it means that distance to nearest fractal is 40% percent of candle size (high i low) - if size of main candle is 100 points- min distance to nearest fractal is than 40 points  
The value of nearest fractal is in the shadow of the signal candle (Shadow of SELL signal candle = Close - Low of signal candle) - the user chooses the option (yes / no)
   = If Not means that Nearest Fractal is not in the shadow of the candle



Indicator sometimes have massage "array out of range error"  . 

Solve this problem something like;  
int OnCalculate(const int rates_total,     
                const int prev_calculated....
int limit =MathMax(rates_total-prev_calculated,2)

or other way.

Also I have alert every tick but I want only once alert per signal.





Custom indicator inputs

------ Boingbands ---------------

UseBollingerBands       = user choise true of false
BollingerBandsperiod = custom input (applay to close)
TuchBollingerBands = 0 or 1 (0 not tuch BB , 1 = tuch BB)
MinDistanceBB = custom input (size in procent of main candle (high - low)) for min distance
= if I put 0.4 it means that distance to BollingerBand is 40% percent of candle size (high i low) - if size of main candle is 100 points- min distance to Bollinger Band UP bands is than 40 points for Buy signal 
= distance formula for UP signal something like (UP BollingerBand value - High (of signal candle))/(High - Low of candle)
= distance formula for DOWN signal something like (Low (of signal candle) - DOWN BollingerBand value)/(High - Low of candle)

MaxDistanceBB           = custom input (size in procent of main candle (high - low)) for max distance do BB


--- NumberOfSameCandleInaRow --

UseNumberOfSameCandleInaRow = true
NumberOfCandleForAnalyse    = 20
MaxNumberOfBerishCandle        = 9     (use only for Buy Signal)
MaxNumberOfBulishCandle        = 9     (use only for SellSignal)

Example

If I put 
MaxNumberOfCandleForAnalyse    = 21
MaxNumberOfBerishCandle        = 4   (use only for Buy Signal)

It means that I am looking Buy Signal that have max 9 BerishCandle in a Row in last 21 candle

------------------------------------------

UseSizeSignalCandle     = the user chooses the option (yes / no) 
SizeSignalCandleMax    = 5 (if I put 5 it means that the size of signal candle is highest in the last 5 bars)


------------- Fractal -------------
UseFractal            = true of false
NumberOfCandleForAnalyseFractal    = 50 (looking for last 50 candles)
MinDistanceFractal                 = custom input (size in procent of main candle (high - low)) for min distance 
           = if I put 0.4 it means that distance to Nearest Fractal is 40% percent of candle size (high i low) - if size of main candle is 100 points- min distance to Fractal is than 40 pints

          =  For Buy Signal Looking Only Fractal above of the High of signal candle
          =  For Sell Signal Looking Only Fractal Below of the Low of signal candle

FractalInShadowOfTheCandle        =  Yes / No
  =  If No means that Nearest Fractal is not in the shadow of the signal candle (shadow for Buy 0 High - Close ; Close - Low for Sell)


When I confirm that indicator is OK then make expert advisor.

Indicator and Expert must be in MQL4 file format not in .exe format.



--------------- Creating an expert advisor --------------

Creating an expert advisor with the signal of the indicator we have made


Creating an expert advisor

Main Inputs

the user chooses the option what to use (lots or percent)

Open One Order

Lots          =0.1; (user put)
MaximumRisk   =0.02; (user put in percent) 0.02 means 2% risk

All order are pending order. It should be For Sell Signal are Sell Stop or Buy Stop for Buy Signal

PendingOrder              = custom input in percent of size of signal candle (size in procent of main candle (high - low)). Like Fibonaci 

                          = For Sell signal if I put 0.05 (means 5% percent of signal candle size) it means that I open a trade 5point below of the Low of signal candle (if size of signal candle is 100 points)
                          = For Buy signal if I put 0.05 (means 5% percent of signal candle size) it means that I open a trade 5 point above of the High of signal candle (if size of signal candle is 100 points)

TakeprofitLevel           = custom input in percent of size of signal candle (size in procent of main candle (high - low)). Like Fibonaci levels

                          = For Sell signal if I put 1.9 (means 190% percent of signal candle size) it means that I take profit 190 point below of the Low of signal candle (if size of signal candle is 100 points). Risk/Reward 1,9
                          = For Buy signal if I put 1.9 (means 190% percent of signal candle size) it means that I take profit 190 point above of the High of signal candle (if size of signal candle is 100 points)

StopLoss                  = custom input in percent of size of signal candle (size in procent of main candle (high - low))

                          = For Sell signal if I put 0.05 (means 5% percent of signal candle size) it means that StopLoss is 5 point Above of the High of signal candle (if size of signal candle is 100 points)
                          = For Buy signal if I put 0.05 (means 5% percent of signal candle size) it means that StopLoss is 5 point Below of the Low of signal candle (if size of signal candle is 100 points)

UseStopLossLevels         = the user chooses the option (yes or no)

StopLossLevel1             = 1.00 custom input in percent of size of signal candle (size in procent of main candle (high - low))
StopLoss1                 = -0.60 custom input in percent of size of signal candle (size in procent of main candle (high - low)) Like Fibonaci retracment
                          = Above means = For Buy signal if I put 1.00 (means 100% percent of signal candle size) it means that signal is 100 point Above of the High of signal candle (if size of signal candle is 100 points)
                          = and expert put new Stopp Loss na 60 points below of the high of signal candle

                          = Above means = For Sell signal if I put 1.00 (means 100% percent of signal candle size) it means that signal is 100 point below of the Low of signal candle (if size of signal candle is 100 points)
                          = and expert put new Stopp Loss na 60 points Above of the Low of signal candle


StopLossLevel2            = 1.90  custom input in percent of size of signal candle
StopLoss2                 = break even

MaxSpread                 = 0.10  custom input in percent of size of signal candle (0.10 means 10% of signal candle in points)

MaxPeriodOfTime           = 7 - max number of candle need to open order. If not open cancel pending order

                          


Important: if signal before opening order touching High of candle For Sell Signal cancel pending order
           if signal before opening order touching Low of candle For Buy Signal cancel pending order

           Expert must be working in the same time in same currency pairs (in separate windows) 

Important: All distance (pending order, stop loss, take profit, BB, fractal ....) are in percent of main size of signal candle in points from high or low of the signal candle (depending on BUY or SELL signal)


I will put some pictures to see this rules if you have job.



Responded

1
Developer 1
Rating
(219)
Projects
370
42%
Arbitration
145
17% / 41%
Overdue
124
34%
Free
2
Developer 2
Rating
(91)
Projects
144
38%
Arbitration
67
15% / 48%
Overdue
55
38%
Free
3
Developer 3
Rating
(65)
Projects
87
39%
Arbitration
3
0% / 33%
Overdue
29
33%
Free
4
Developer 4
Rating
(94)
Projects
148
59%
Arbitration
16
38% / 13%
Overdue
25
17%
Free
5
Developer 5
Rating
(51)
Projects
66
30%
Arbitration
2
0% / 0%
Overdue
0
Free
6
Developer 6
Rating
(5)
Projects
4
25%
Arbitration
2
0% / 50%
Overdue
1
25%
Working
Similar orders
Experience programmer needed who can build a sample double top and double bottom pattern EA that send signal alerts to telegram the must send signal alerts to telegram only after the pattern confirm
I’m looking for a developer who can build a profitable EA for MT5. EA should have no major equity drops or daily drawdown. Looking for a solid trading system. NO martingale or Grid strategy EA should make around 10% a week Risk per trade should be 1% EA should use SL and TP
I'm looking for a experience programmer to build me a EA that send signal alert to telegram Moving average convergence/divergence (MACD) and RSI is a technical indicator to help investors identify market entry points for buying or selling. The MACD line is calculated by subtracting the 26-period exponential moving average (EMA) from the 12-period EMA. The signal line is a nine-period EMA of the MACD line Moving
I am looking for a day trading bot with over 95% success ratio for gold and forex. It should use all the relevant strategies like moving averages (10, 20, 50), volume, RSI and trend into consideration and then generate buy and sell trade automatically with trailing SL and generate max profit
an ea that is based on a custom indicator, currently it works very fine but would like to add following... 1.make sure tp and sl values are calculated in points and are calculated from previous bar close (the one before our entry current bar) 2.check if a trade is already far from previous bar close than dont allow it, set the distance value in points (if current signal candle that is still formin and we would enter
I need a feature setup that will input the Sunday opening price as a horizontal ray on any chart and can be used by another EA as part of a trading strategy. Like this TradingView example below
I need a mobile phone EA that is similar to no limitz EA mobile bot which will use an ea converter for scalping strategy that will execute trade automatically, set tp and sl for different pairs using integrated trading strategies . It must hedge for both action to buy and sell under 1 min and 5 min based on scalping strategy to execute trades
Hello everyone, I am looking for a talented developer who can help me create my EA. I have several indicators that I want to combine in the EA. I will take care of the integration of the indicators and the trading strategy myself, I need someone to program all the trading operations for me. This is probably absolutely standard, someone with experience has certainly programmed this several times before. Here are the
Hi there, I am looking for someone to build a Martingale/Cost Averaging Expert Advisor (EA) with the following features and functions: Martingale and Cost Averaging Features: 1. **Martingale Calculation Settings:** - Standard Martingale system allowing the trader to set the initial trade size and the pip step for subsequent trades. - Option for averaging up and averaging down: - **Averaging Up:** Lot size
Job Title: MQL5 Trading Bot Code Debugging and Optimization** **Description:** We are seeking an experienced MQL5 developer proficient in debugging and optimizing trading bot codes. The current project involves fixing existing code that runs into debugging issues without errors and optimizing it for efficient performance in live trading environments. **Responsibilities:** - Debug existing MQL5 trading bot code to

Project information

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