Bollinger Bands EA (Convert from Pine Script to MQ4L)

MQL4 Эксперты

Техническое задание

Hello, I'd need help to code a simple EA based on Bollinger Bands indicator. The code is below in Pine Script (from Trading View platform) and need to convert it to Metatrader

thanks


//////// 

len = input(20, minval=1, title="Length") 
multiplier = input(4, minval=1, title="multiplier") 
trendTimeFrame = input(60, minval=1, title="Trend Time Frame") 
useTrendFilter = input(true, type=bool, title = "Use Trend Filter") 

src = input(close, title="Source") 
out = sma(src, len) 
//plot(out, title="SMA", color=blue) 

stdOut = stdev(close, len) 
bbUpper = out + stdOut * multiplier 
bbLower = out - stdOut * multiplier 
bbUpper2 = out + stdOut * (multiplier / 2) 
bbLower2 = out - stdOut * (multiplier / 2) 
bbUpperX2 = out + stdOut * multiplier * 2 
bbLowerX2 = out - stdOut * multiplier * 2 
bbWidth = (bbUpper - bbLower) / out 


closeLongTerm = security(tickerid, tostring(trendTimeFrame), close) 
smaLongTerm = security(tickerid, tostring(trendTimeFrame), sma(close,20)) 

//plot(smaLongTerm, color=red) 

trendUp = useTrendFilter ? (closeLongTerm > smaLongTerm) : true 
trendDown = useTrendFilter? (closeLongTerm < smaLongTerm) : true 

bearish = ((cross(close,bbUpper2) == 1) or (cross(close,out) == 1)) and (close[1] > close) and trendDown 
bullish = ((cross(close,bbLower2) == 1) or (cross(close,out) == 1)) and (close[1] < close) and trendUp 


closeBuy = (high[1] > bbUpper[1]) and (close < bbUpper) and (close < open) and trendUp 
closeSell = (((low[1] bbLower)) or ((low[2] bbLower[1]))) and (close > open) and trendDown 


cutLossBuy = iff(bbWidth > 0.005, (low bbLower[1]) and trendUp, (low bbLowerX2[1]) and trendUp) 
cutLossSell = iff(bbWidth > 0.005, (high > bbUpper) and (high[1] bbUpperX2) and (high[1] < bbUpperX2[1]) and trendDown) 


if (bullish) 
strategy.entry("Buy", strategy.long, comment="Buy") 

if (bearish) 
strategy.entry("Sell", strategy.short, comment="Sell") 


strategy.close("Buy", closeBuy or cutLossBuy) 

strategy.close("Sell", closeSell or cutLossSell)


Откликнулись

1
Разработчик 1
Оценка
(13)
Проекты
24
42%
Арбитраж
3
33% / 0%
Просрочено
4
17%
Свободен
2
Разработчик 2
Оценка
(117)
Проекты
138
41%
Арбитраж
30
7% / 77%
Просрочено
17
12%
Свободен
Похожие заказы
Objective Develop an MQL5 Expert Advisor (EA) that: 1. Saves historical economic news data** from MetaTrader’s economic calendar into a `.csv` file for backtesting purposes. 2. Implements news event filtering** for both backtesting and live trading, based on user-defined parameters such as event impact level, currency, and pre/post event trade restrictions. Scope of Work The EA must perform the following tasks: 1
CORREÇÃO NOTIFICAÇÕES Ø O indicador muda a cor dos candles e da MA200 quando ocorre as entradas e é somente nesse momento que ele deve enviar notificação de entrada porem está enviando em outros momentos que não atende as condições conforme imagem abaixo. Ø Sempre que abro o MT5, mudo o time frame ou a plataforma perde conexão o indicador me envia notificações de entradas passadas, o indicador deve enviar
Seb’s EA 2024/25 200 - 500 USD
Primary Agreement Description Details: This EA Strategy is to run on MT4. It has parameters for 2 MA's and 3 momentum indicators along with 22 "variable / constant rules & settings" on 1 time-frame (5 Min). There are 3 versions required to cater for 3 different Instruments (3 US Indexes). The only differences will be the position sizes, Stop levels & Macd bands. There are 3 entry conditions with 3 exit conditions
Hi I have an indicator that i have tried to create an EA with, this is a simple EA that should have bought on green indicator value if previous candle indicator value was yellow. Then it should have sold when indicator value was red with previous value being yellow. Now, i would not say that i am a coder, by any stretch of the imagination, but something this simple should have been easy, instead, the EA would open
Hi, While backtesting using MT4 strategy tester I should be able to close my trade where I want. This will help me with my trading strategy. I need an utility or EA for that. I hope this is a simple task and I will be able to get this completed in 24 hours. I need to see the prototype first. You can lock it with dates. Once I test it, I will move the work to your name and will close the project. NOTE : After I
Hello, I am looking for an indicator for MetaTrader 4 with the characteristics of the indicator shown on the page below. The indicator will be used as a signal provider for binary options. https://www.youtube.com/@trendify.binaryoptions Thank you very much, Luciano Gonzaga
ENGULFING TRAILING STOP GRID MQL5 FULL AUTOMATIC EA AUTOTRADER I WANT AN AUTOTRADER WITH: - AUTOMATED ENGULFING UNLIMITED GRID ORDERS DISTANCE (IN POINTS). - ORDER LOT SIZE FREE MARGING PORCENTAGE (IN POINTS AND DECIMALS - 0.0000000000 UNLIMITED). - CLOSING ORDERS ONLY WITH PROFIT TRAILING STOPS (IN MINIMUM POINTS). **UPDATED EDITION: I WAS ASKING FOR THE CORRECTION OF MY CREATION WITH AI ASSISTS (CHATGPT AND GOOGLE
Hi Auto trading robot in mt4 need to be develop simple price action strategy i can pay 30 usd for this interested coder can ask for more details then i can share strategy details who is ready to do it
i am looking for experienced programmers who can help me out make my expert with zero lags and run smoothly and develop it in any possible way that make the accuracy way higher i need in addition to make this expert advisor linked on mt4 and mt5 also link the ea to WhatsApp and telegram bot where it giveS signals of the expert on it
Mr fano 30+ USD
I want a robot that will teach me how to be a good Forex trader, teach me the necessary requirements,and also teach me how the save. And a robot that will understand my needs and support me when I'm lost or don't understand a certain thing.. The robot should have good trading skills. Thank you

Информация о проекте

Бюджет
10 USD
Исполнителю
9 - 9 USD
Сроки выполнения
от 1 до 2 дн.