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

İş Gereklilikleri

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.



Yanıtlandı

1
Geliştirici 1
Derecelendirme
(219)
Projeler
370
42%
Arabuluculuk
145
17% / 41%
Süresi dolmuş
124
34%
Serbest
2
Geliştirici 2
Derecelendirme
(91)
Projeler
144
38%
Arabuluculuk
67
15% / 48%
Süresi dolmuş
55
38%
Serbest
3
Geliştirici 3
Derecelendirme
(65)
Projeler
87
39%
Arabuluculuk
3
0% / 33%
Süresi dolmuş
29
33%
Serbest
4
Geliştirici 4
Derecelendirme
(94)
Projeler
148
59%
Arabuluculuk
16
38% / 13%
Süresi dolmuş
25
17%
Serbest
5
Geliştirici 5
Derecelendirme
(51)
Projeler
66
30%
Arabuluculuk
2
0% / 0%
Süresi dolmuş
0
Serbest
6
Geliştirici 6
Derecelendirme
(5)
Projeler
4
25%
Arabuluculuk
2
0% / 50%
Süresi dolmuş
1
25%
Çalışıyor
Benzer siparişler
Hi I need a experience programmer to build me all harmonic pattern scanner indicator the must send alert with arrow on screen without open trades Multiple times frame H4 D1 W1 MN multiple currency pairs and i want to see all historical patterns that already happened
Pls if have a bos/ CHoCH indicator, about market structure when market changes character and when its down trend you can give me or create an indicator that knows market structure well simply if the market is on downtrend the indicator will know and if it’s on up trend the indicator will also know
I have two jobs actually. 1) I have source code and this one is based on getting signals and implementing. 2) I dont ave source code but you can view source code through any desk than compile those changes at your computer and at the time of implementation, you can do it thru anydesk. these are the changes i require in both: 1) Martingale strategy with manual settings , number of pips it, distance, profit can
Help needed 50+ USD
1. "Need help with my account! Assistance required ASAP!" 2. "Account assistance needed! Please help me resolve my issue!" 3. "Stuck with my account! Can someone lend a hand?" 4. "Account issues! Seeking help from a pro!" 5. "Help needed with my account! Please guide me through the process!"
Ceejay robots 50+ USD
Hllo ceejay I hope u can help me assistant plzz I'm depending on u I know I picked correct robot I know u got this I believe in u I know we can work together
Experience programmer needed who can build a sample double top and double bottom pattern indicator that send alert with arrow without open trades must send signal alerts 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 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

Proje bilgisi

Bütçe
30 - 60 USD
Geliştirici için
27 - 54 USD
Son teslim tarihi
from 5 to 10 gün