Expert Advisor based on Bollinger's "squeeze" using Bollinger bands, BBW (bands bandwidth) and %B (percentB)

Specification


Input parameters


Na = period of the moving average

k = multiplier f Standard deviation in UBB/LBB

Nd = length of BBW valley


Lf = lower filter for %B

Uf = upper filter for %B


MaxL = amount of bearable Loss in value


Fs = freeze start (hh:mm), with minimum interval of 30m

Fe = freeze end (hh:mm), with minimum interval of 30m




Custom indicators


Squeeze is based on BBW (Bollinger BandWidth) and %B (PercentB), which are indicators based on Bollinger Bands. 


Bollinger Bands


UBB (Upper Bollinger Band) = [SMA(Na) + k * DS], 

LBB (Lower Bollinger Band) = [SMA(Na) - k * DS], 


where N is a parameter indicating the period of the SMA (simple moving average), DS is the standard deviation of SMA,m and k is an input parameter


%B (PercentB)


%B = (Close – LB) / (UB – LB)


where (UB-LB) is the width of Bollinger Bands, and %B expresses the distance between closing price and lower band, as a ratio with the bands width. 


Although the formula is similar to oscillators, %B can be lower than 0 and higher that +1


BBW (bands bandwidth)


BBW = (UB – LB) / MA


BBW express that bands bandwidth, in comparison to the price moving average.




Entry Signal



(see picture "example 1": price chart showing closing candle, first indicator chart showing entry signal on BBW indicator, lower indicator chart showing entry signal on %B indicator)


The entry signal occurs when BBW exits a valley of length Nd periods, while at the same time %B is beyond the filter limits.


…BBW exits a valley of length Nd periods…

this means that BBW last value is higher than the previous Nd values of BBW. In other words, the previous Nd value of BBW are lower than the current value, while instead the (Nd+1) value was higher.


…%B is beyond the filter limits…

This means that %B is either below Lf or above Uf, in other words it is not Lfv < %B < Uf



Stop Loss (fixed)


Fixed stop loss is set at the value of SMA at closing candle just before the entry signal.



Lot Sizing


Lot sizing of entry order is based on:

-distance between entry level OL and stop level SL (in pips/ticks)

-amount of bearable Loss in value MaxL

-in case the market price is expressed in a currency XXX different than EUR, the sizing will consider the current rate between EUR and the denomination currency (e.g. EURGBP for markets in GBP)


Size (lots) = MaxL (€) / [ (OL-SL) * 10 * rate EURXXX ]



Target signal


The target signal (take profit) happens when the width of Bollinger bands stops to increase, in other words when BBW (-1) < (BBW (-2).


This condition is checked on every closed candle.



Freeze period (optional)


A freeze period can be set, as an interval of inactivity of the EA. If both values Fs and Fe are set, then freeze period is between Fs and Fe. If one of both values are empty, freeze period is not active.

 

During the freeze period, no new orders can be opened, even though an entry signal is triggered.

Yet, during the inactivity period the position management is still valid, i.e. any open order can be closed in stop or in target if the stop or target signal is triggered.



(see picture "example 2": freeze period between 22:00 and 06:00)


Additional commands and options


The present document only includes the description of the strategy. Final version of the expert advisor will include additional commands for screenview customization, like the colour of the bands, width of the bands, and so on.



Table of controlo


EA will show in the top left corner of the screen a recap of main input data and running values:


-EA “Squeeze”

-freeze: from --- to --- 

-period of MA:   Na

-factor of SD: k

-BBW valley: Nd

-%B filter low: Lf

-%B filter up: Lu

-max loss: MaxL €


 

(see picture "example 3": indication of active parameters (picture is just for demonstration purpose, it is related to a different expert advisor and it is not showing the correct parameters)



Delivery of the project: open code in .mq4 (not compiled)

Deadline: 7 days from agreement

 


Responded

1
Developer 1
Rating
(11)
Projects
27
30%
Arbitration
3
0% / 0%
Overdue
1
4%
Busy
2
Developer 2
Rating
(5)
Projects
6
17%
Arbitration
0
Overdue
0
Free
3
Developer 3
Rating
(161)
Projects
192
26%
Arbitration
8
25% / 38%
Overdue
5
3%
Loaded
4
Developer 4
Rating
(358)
Projects
491
52%
Arbitration
24
54% / 25%
Overdue
5
1%
Working
5
Developer 5
Rating
(64)
Projects
198
72%
Arbitration
4
100% / 0%
Overdue
1
1%
Free
6
Developer 6
Rating
(72)
Projects
80
10%
Arbitration
36
8% / 53%
Overdue
6
8%
Working
7
Developer 7
Rating
(15)
Projects
18
39%
Arbitration
2
50% / 50%
Overdue
0
Working
8
Developer 8
Rating
(379)
Projects
404
31%
Arbitration
64
19% / 69%
Overdue
51
13%
Loaded
9
Developer 9
Rating
(27)
Projects
27
26%
Arbitration
2
0% / 50%
Overdue
1
4%
Free
10
Developer 10
Rating
(391)
Projects
417
69%
Arbitration
4
75% / 0%
Overdue
2
0%
Working
11
Developer 11
Rating
(130)
Projects
165
43%
Arbitration
20
60% / 20%
Overdue
9
5%
Loaded
12
Developer 12
Rating
(9)
Projects
4
0%
Arbitration
11
0% / 82%
Overdue
0
Free
13
Developer 13
Rating
(42)
Projects
88
14%
Arbitration
31
29% / 55%
Overdue
36
41%
Working
14
Developer 14
Rating
(37)
Projects
59
27%
Arbitration
25
20% / 52%
Overdue
10
17%
Working
15
Developer 15
Rating
(564)
Projects
933
47%
Arbitration
303
59% / 25%
Overdue
125
13%
Loaded
16
Developer 16
Rating
(1)
Projects
2
0%
Arbitration
1
100% / 0%
Overdue
0
Working
Similar orders
Enter buy trade at close of candle when bar closes above the 3 emas. Emas are 34 ema, 64 ema and 128 ema. For a buy trade the 34 ema must be above the other two emas. The 64 ema should be in the middle. The 128 ema should be below the other two emas. For a buy trade the Awesome Oscillator should be above the middle line and colored green. Exit a buy trade when price touches 64 ema. Sell trade same conditions as buy
I want to make AI based on Attached Picture Swing High low. If you have experience can share demo first. Stop loss, take profit, trailing , break even ,DD etc. also amiable
Hello, I’m looking for a TradingView indicator that fits my forex trading needs. If you can create or customize one for me, please reach out. I'd appreciate your help! Thanks in advance."
Pls I need help I don’t have much but pls accept my little payment for the work thanks 🙏 mt5 file Once it opens buy and move positively to buy let it use auto trailing to follow the trend that’s if I choose to use trailing option and before the trailing starts it must reach the actual profit target example if I set profit target to 500 then once profit is at 500 let trailing immediately protect it and any 1 pip
Hey greetings am in need of a developer that can convert my simple tradingview indicator to MT4 I have the source code of the indicator and is also a public indicator on Tradingview site Kindly bid and let started
Hello my developer colleagues, am also a developer like you but i just hear about this mql site and i will like to sell, develop and build bots for buyer. But i don't know how to become a seller here please i need help in helping me to create a seller account on mql and i will be very glad if you can help me out and i will appreciate you
Preciso de um EA que abra ordens a mercado a partir de um indicador, Ele precisa obter take e stop loss fixos, spread máximo, horários de início e final das operações, meta e stop diário, martingale, painel e a função no script para que eu possa ceder o EA apartir do id do mt4 de terceiros
Hello Investors, I'm selling a profitable and stable expert advisor trading on the Gold (XAUUSD) pair using a cutting-edge scalping strategy. The EA is able to generate a stable monthly income without using martingale strategy, and with an optional cut loss in place. Particularly the average monthly gain can go from 2-3% (at a relatively low risk, with an historical max DD of 6%) to 20-30% (with an aggressive style
can you help me with Ctrader i need modification on the linkhttps://docs.google.com/document/d/1fggk49xWbnwahtfOlE-U7G6muZB1FT8eWmftGiY7R-s/edit?usp=sharing can you assist with cTrader modifications to enhance functionality and improve performance. do text me if you a professional on it i will be looking forward to your response best regards
Would I honestly need is someone who can make a profitable EA for me that can at least make me around $80 a day starting with $50 and the EA must be able to work with exness the EA should automat trades 24/7. Broker = Exness Pairs = USD/JPY XAU/USD and etc Chart time frames = M1 M15 History = last month till last 6 months. Lot size 0.10 take profit at $2 stop

Project information

Budget
150 - 200 USD
VAT (22%): 33 - 44 USD
Total: 183 - 244 USD
For the developer
135 - 180 USD
Deadline
from 15 to 25 day(s)