Specification

//@version=5
strategy("SMA 20 + Engulfing Strategy", overlay=true)

// Define strategy inputs
smaPeriod = input(20, title="SMA Period")
stopLossPercent = input(1, title="Stop Loss %")
takeProfitPercent = input(2, title="Take Profit %")

// Calculate SMA
smaValue = ta.sma(close, smaPeriod)

// Determine bullish engulfing condition
isBullishEngulfing = ta.isbullishengulfing(close, open)

// Determine bearish engulfing condition
isBearishEngulfing = ta.isbearishengulfing(close, open)

// Define entry and exit conditions
enterLong = crossover(close, smaValue) and isBullishEngulfing
enterShort = crossunder(close, smaValue) and isBearishEngulfing
exitLong = ta.change(close) < 0
exitShort = ta.change(close) > 0

// Calculate stop loss and take profit levels
stopLossLevel = close * (1 - stopLossPercent / 100)
takeProfitLevel = close * (1 + takeProfitPercent / 100)

// Execute trades based on entry and exit conditions
if (enterLong)
    strategy.entry("Buy", strategy.long)
    strategy.exit("Sell", "Buy", stop=stopLossLevel, limit=takeProfitLevel)

if (enterShort)
    strategy.entry("Sell", strategy.short)
    strategy.exit("Cover", "Sell", stop=stopLossLevel, limit=takeProfitLevel)

// Plot the SMA on the chart
plot(smaValue, color=color.blue, title="SMA 20")

Responded

1
Developer 1
Rating
(22)
Projects
28
11%
Arbitration
6
33% / 50%
Overdue
4
14%
Working
2
Developer 2
Rating
(63)
Projects
68
25%
Arbitration
12
42% / 42%
Overdue
4
6%
Free
3
Developer 3
Rating
(4)
Projects
6
0%
Arbitration
4
25% / 75%
Overdue
0
Free
4
Developer 4
Rating
(451)
Projects
510
33%
Arbitration
25
40% / 48%
Overdue
7
1%
Loaded
5
Developer 5
Rating
(475)
Projects
504
53%
Arbitration
10
60% / 20%
Overdue
3
1%
Free
6
Developer 6
Rating
(289)
Projects
431
64%
Arbitration
5
40% / 0%
Overdue
4
1%
Loaded
7
Developer 7
Rating
(32)
Projects
41
68%
Arbitration
5
0% / 60%
Overdue
14
34%
Free
8
Developer 8
Rating
(119)
Projects
127
41%
Arbitration
3
33% / 67%
Overdue
0
Free
9
Developer 9
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
10
Developer 10
Rating
(41)
Projects
88
14%
Arbitration
30
30% / 53%
Overdue
36
41%
Working
11
Developer 11
Rating
(563)
Projects
932
47%
Arbitration
301
59% / 25%
Overdue
124
13%
Working
Similar orders
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
I am seeking a highly skilled and experienced developer to assist with an important project. I need a development of an automated trading bot for NinjaTrader, utilizing a 4 SMA (Simple Moving Average) crossing strategy, with additional custom diversions for trade entries. The bot needs to be based on a strategy involving the crossing of four different SMAs. The exact periods for these SMAs and the conditions for
So i have copier EA. The idea is the EA will triggered through manual OP by user via mobile or whatever platform. Let's say 0.01 lot to trigger it. After the EA takes master's position, the EA will be standby mode. If the master take more OP, the EA still not take the master's position (OP) until the user input manually once again via mobile for another 0.01 lot. Since this is a MT4 EA, Whenever user want to close
preciso de um robô com duas médias móveis, uma exponencial high e uma exponencial low. preciso também ter a opção de utilizar e todos os tempos gráficos e alterar os parâmetros das médias. entrada de compra será feita quando um candle de alta romper e fechar a cima da média high e fechará a posição quando um candle de baixa romper e fechar a baixo da média low. a venda será feita quando o candle de baixa romper e
Description - An expert advisor(s), placing sell trades in EUR/USD, based on the close price of the previous two candles, as shown in the figure below. The trades would be made in the 5 minute, 1 hour, and 1 day timeframes. In the 5 minute and 1 hour timeframes the market orders would be placed at the start of a new candle, at specific times EST. The order would be cancelled at the close of that candle, i.e after 5
Greetings, As the title suggests, I am trying to convert an indicator that calls itself via an iCustom call like this. iMAArray_Buffer[loop_1] = iCustom ( NULL , Selected_TF, MQLInfoString ( MQL_PROGRAM_NAME ), "calculate" , RPeriod, MType, MPeriod, 1 , shift); Full code will not be provided, only the position that needs fixing. I cannot get this working in MQL5 but the original code runs smoothly in MQL4. Please
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Greetings great developer, I am in search of a highly skilled developer to assist with an exciting project. I need to convert two open-source TradingView indicators to NinjaTrader 8 and implement a usage restriction based on computer IDs. If you have experience with NinjaTrader 8 coding please let me know. I’d be happy to discuss the details further
Greetings great developer, I am in search of a highly skilled MQL5 developer to assist with an exciting project. I need to convert two open-source TradingView indicators to NinjaTrader 8 and implement a usage restriction based on computer IDs. If you have experience with NinjaTrader 8 coding please let me know. I’d be happy to discuss the details further

Project information

Budget
30 - 200 USD
For the developer
27 - 180 USD