Convert Tradingview's (Pinescript) Engulfing Indicators to MQL5 for MetaTrader5 Use

İş tamamlandı

Tamamlanma süresi: 1 gün
Müşteri tarafından geri bildirim
Excellent work! Perfectly done and quick.
Geliştirici tarafından geri bildirim
Kind and correct customer. great!!!

İş Gereklilikleri

For bearish:

//@version=4

study("Engulfing - Bearish", shorttitle = "Engulfing - Bear", overlay=true)


C_DownTrend = true

C_UpTrend = true

var trendRule1 = "SMA50"

var trendRule2 = "SMA50, SMA200"

var trendRule = input(trendRule1, "Detect Trend Based On", options=[trendRule1, trendRule2, "No detection"])


if trendRule == trendRule1

priceAvg = sma(close, 50)

C_DownTrend := close < priceAvg

C_UpTrend := close > priceAvg


if trendRule == trendRule2

sma200 = sma(close, 200)

sma50 = sma(close, 50)

C_DownTrend := close < sma50 and sma50 < sma200

C_UpTrend := close > sma50 and sma50 > sma200

C_Len = 14 // ema depth for bodyAvg

C_ShadowPercent = 5.0 // size of shadows

C_ShadowEqualsPercent = 100.0

C_DojiBodyPercent = 5.0

C_Factor = 2.0 // shows the number of times the shadow dominates the candlestick body


C_BodyHi = max(close, open)

C_BodyLo = min(close, open)

C_Body = C_BodyHi - C_BodyLo

C_BodyAvg = ema(C_Body, C_Len)

C_SmallBody = C_Body < C_BodyAvg

C_LongBody = C_Body > C_BodyAvg

C_UpShadow = high - C_BodyHi

C_DnShadow = C_BodyLo - low

C_HasUpShadow = C_UpShadow > C_ShadowPercent / 100 * C_Body

C_HasDnShadow = C_DnShadow > C_ShadowPercent / 100 * C_Body

C_WhiteBody = open < close

C_BlackBody = open > close

C_Range = high-low

C_IsInsideBar = C_BodyHi[1] > C_BodyHi and C_BodyLo[1] < C_BodyLo

C_BodyMiddle = C_Body / 2 + C_BodyLo

C_ShadowEquals = C_UpShadow == C_DnShadow or (abs(C_UpShadow - C_DnShadow) / C_DnShadow * 100) < C_ShadowEqualsPercent and (abs(C_DnShadow - C_UpShadow) / C_UpShadow * 100) < C_ShadowEqualsPercent

C_IsDojiBody = C_Range > 0 and C_Body <= C_Range * C_DojiBodyPercent / 100

C_Doji = C_IsDojiBody and C_ShadowEquals


patternLabelPosLow = low - (atr(30) * 0.6)

patternLabelPosHigh = high + (atr(30) * 0.6)


C_EngulfingBearishNumberOfCandles = 2

C_EngulfingBearish = C_UpTrend and C_BlackBody and C_LongBody and C_WhiteBody[1] and C_SmallBody[1] and close <= open[1] and open >= close[1] and ( close < open[1] or open > close[1] )

alertcondition(C_EngulfingBearish, title = "Engulfing", message = "New Engulfing - Bearish pattern detected.")

if C_EngulfingBearish

    var ttBearishEngulfing = "Engulfing\nAt the end of a given uptrend, a reversal pattern will most likely appear. During the first day, this candlestick pattern uses a small body. It is then followed by a day where the candle body fully overtakes the body from the day before it and closes in the trend’s opposite direction. Although similar to the outside reversal chart pattern, it is not essential for this pattern to fully overtake the range (high to low), rather only the open and the close."

    label.new(bar_index, patternLabelPosHigh, text="BE", style=label.style_label_down, color = color.red, textcolor=color.white, tooltip = ttBearishEngulfing)

bgcolor(highest(C_EngulfingBearish?1:0, C_EngulfingBearishNumberOfCandles)!=0 ? color.red : na, offset=-(C_EngulfingBearishNumberOfCandles-1))



For bullish:

//@version=4

study("Engulfing - Bullish", shorttitle = "Engulfing - Bull", overlay=true)


C_DownTrend = true

C_UpTrend = true

var trendRule1 = "SMA50"

var trendRule2 = "SMA50, SMA200"

var trendRule = input(trendRule1, "Detect Trend Based On", options=[trendRule1, trendRule2, "No detection"])


if trendRule == trendRule1

priceAvg = sma(close, 50)

C_DownTrend := close < priceAvg

C_UpTrend := close > priceAvg


if trendRule == trendRule2

sma200 = sma(close, 200)

sma50 = sma(close, 50)

C_DownTrend := close < sma50 and sma50 < sma200

C_UpTrend := close > sma50 and sma50 > sma200

C_Len = 14 // ema depth for bodyAvg

C_ShadowPercent = 5.0 // size of shadows

C_ShadowEqualsPercent = 100.0

C_DojiBodyPercent = 5.0

C_Factor = 2.0 // shows the number of times the shadow dominates the candlestick body


C_BodyHi = max(close, open)

C_BodyLo = min(close, open)

C_Body = C_BodyHi - C_BodyLo

C_BodyAvg = ema(C_Body, C_Len)

C_SmallBody = C_Body < C_BodyAvg

C_LongBody = C_Body > C_BodyAvg

C_UpShadow = high - C_BodyHi

C_DnShadow = C_BodyLo - low

C_HasUpShadow = C_UpShadow > C_ShadowPercent / 100 * C_Body

C_HasDnShadow = C_DnShadow > C_ShadowPercent / 100 * C_Body

C_WhiteBody = open < close

C_BlackBody = open > close

C_Range = high-low

C_IsInsideBar = C_BodyHi[1] > C_BodyHi and C_BodyLo[1] < C_BodyLo

C_BodyMiddle = C_Body / 2 + C_BodyLo

C_ShadowEquals = C_UpShadow == C_DnShadow or (abs(C_UpShadow - C_DnShadow) / C_DnShadow * 100) < C_ShadowEqualsPercent and (abs(C_DnShadow - C_UpShadow) / C_UpShadow * 100) < C_ShadowEqualsPercent

C_IsDojiBody = C_Range > 0 and C_Body <= C_Range * C_DojiBodyPercent / 100

C_Doji = C_IsDojiBody and C_ShadowEquals


patternLabelPosLow = low - (atr(30) * 0.6)

patternLabelPosHigh = high + (atr(30) * 0.6)


C_EngulfingBullishNumberOfCandles = 2

C_EngulfingBullish = C_DownTrend and C_WhiteBody and C_LongBody and C_BlackBody[1] and C_SmallBody[1] and close >= open[1] and open <= close[1] and ( close > open[1] or open < close[1] )

alertcondition(C_EngulfingBullish, title = "Engulfing", message = "New Engulfing - Bullish pattern detected.")

if C_EngulfingBullish

    var ttBullishEngulfing = "Engulfing\nAt the end of a given downward trend, there will most likely be a reversal pattern. To distinguish the first day, this candlestick pattern uses a small body, followed by a day where the candle body fully overtakes the body from the day before, and closes in the trend’s opposite direction. Although similar to the outside reversal chart pattern, it is not essential for this pattern to completely overtake the range (high to low), rather only the open and the close."

    label.new(bar_index, patternLabelPosLow, text="BE", style=label.style_label_up, color = color.blue, textcolor=color.white, tooltip = ttBullishEngulfing)

bgcolor(highest(C_EngulfingBullish?1:0, C_EngulfingBullishNumberOfCandles)!=0 ? color.blue : na, offset=-(C_EngulfingBullishNumberOfCandles-1))


*The bullish and bearish indicators shall be combined into one indicator, any object e.g. arrow can be used to indicate the signal, plus integration of alerts. Trend rules not necessary and may be removed for simplicity. Conditions in bold text are the only ones necessary to create arrow object and alert. Thank you.


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(166)
Projeler
189
10%
Arabuluculuk
37
38% / 35%
Süresi dolmuş
5
3%
Yüklendi
2
Geliştirici 2
Derecelendirme
(126)
Projeler
159
35%
Arabuluculuk
4
25% / 50%
Süresi dolmuş
13
8%
Çalışıyor
3
Geliştirici 3
Derecelendirme
(402)
Projeler
530
74%
Arabuluculuk
9
44% / 0%
Süresi dolmuş
24
5%
Ücretsiz
Benzer siparişler
Hey, I would like to run EA on muliple symbols and on each symbol can have different preset depending on strategy optimation. It should run on MT5. == I am a beginner in mql5, tried to write it on my own so some code exists, but open positions on the next opened bar, and trailing stop is fixed, not ATR based. It calculates SL as % of risk but doesn't work when position size is bigger than balance allows (so no max
I need a programmer that can teach me how to get historical tick data (from predownloaded csv) and make it display when back-testing in the MT4 terminal. What I need from you is to build a panel that reads in the ticks from a predefined start time up to and including the current time of the back-test. It needs to: 1. Count the total number of ticks from the predefined start time. 2. Display the current tick's ask
Hey, im looking for a person who can create an my very own version of pineconnector, which should have all the option of pineconnector and it should be user-friendly without any complications
HI, I'm looking for an experienced person who can add buy/sell indications and Alerts on existing Pinescript along with little modification of the script and the script should connect to MT5 platform using pineconnector MT5 platform should excute trade instantly as based on the alerts/indications on tradingview script
We are seeking a highly experienced Forex EA Developer for our MT4 platform. The ideal candidate must meet our following criteria: Language Proficiency: Must speak English fluently - no exceptions Must write in English proficiently - no exceptions Must understand English clearly - no exceptions Availability: Must work in the Eastern Standard Time (EST) zone Developer must be available full-time for this project with
Requirements All features of indicators, plus enter into trades (buy, sell) TP and SL according to the indicator [TP1 and TP2] Can make MT5 from MT4 indicator? Add trailing stop loss trading hours trading days Max spread Possibility of Multiple charts through one window Daily profit Target [yes/no]
hello... saya menginginkan EA GRID?AVERAGING dengan kondisi : > bisa meletakan sell&buy Limit pada nilai tertentu > bisa meletakkan sell&buy stop pada nilai tertentu > bisa melakukan order sell/buy limit/stop (sesuai setting) berdasarkan Nilai RSI > bisa membatasi jumlah order > ada fungsi TP dan SL > rangkuman hasil kerja EA selama mingguan terimakasih, semoga bisa bekerjasama dengan baik
I already have the EA completed. I just need to add 2 params and fix the feature (GV) to make sure that no order is missed for any reason. Maybe GV is not enough and need to add another feature
Need to create ea to trade in indian market by placing orders to Indian market platform through API form mqlHere's a basic outline of what script should include: Define Heikin Ashi candle pattern: Convert regular candles to Heikin Ashi candles. Order Execution: Execute orders on the open of the second candle after the signal is generated. Buy Call: When a buy call is generated, initiate a call option order. Set
I want the trade to trigger anytime it sees the opportunity on all time frames, sl tp should be automated and all trades should be trigger anytime on cpi news and etc

Proje bilgisi

Bütçe
30 - 40 USD
Geliştirici için
27 - 36 USD
Son teslim tarihi
from 2 to 4 gün