Re-entry buy with LWMA 5 and 10 Low

Tarea técnica

Description of the ScriptThis script is designed for MetaTrader 4 (MT4) to execute a Buy order based on a re-entry strategy using the BBMA (Bollinger Bands Moving Average) approach. The main timeframe used is H1 (1-hour), and the script employs the Classic Bullish Engulfing pattern as a validation criterion before placing a Buy order.Key Components of the Script:Input Parameters:Lots: Defines the lot size for the trade (default is 0.1).LWMA5_Period: The period for the 5-period Linear Weighted Moving Average (LWMA) applied to the Low price on the H1 timeframe.LWMA10_Period: The period for the 10-period Linear Weighted Moving Average (LWMA) applied to the Low price on the H1 timeframe.EMA_Period: The period for the 50-period Exponential Moving Average (EMA) applied to the Close price on the H1 timeframe.Global Variables:lwma5Value: Stores the calculated value of the 5-period LWMA on the H1 timeframe.lwma10Value: Stores the calculated value of the 10-period LWMA on the H1 timeframe.emaValue: Stores the calculated value of the 50-period EMA on the H1 timeframe.Initialization and Deinitialization:The OnInit() and OnDeinit() functions are placeholders for initialization and cleanup code when the script is loaded or unloaded.OnTick Function:This is the main function that is executed every time a new tick (price change) is received.Inside OnTick():LWMA and EMA Calculation:The script calculates the 5-period LWMA (lwma5Value) and 10-period LWMA (lwma10Value) on the Low price of the H1 timeframe.It also calculates the 50-period EMA (emaValue) on the Close price of the H1 timeframe.Re-entry Signal Validation on H1:The script checks if the previous candle's Close price was below the 5-period LWMA and the current candle's Close price is above both the 5-period and 10-period LWMAs, as well as above the 50-period EMA.Check for Existing Orders:Before placing a new Buy order, the script checks if there is already an open Buy order to avoid multiple entries.Validation on M15 Timeframe:The script validates the conditions on the M15 (15-minute) timeframe:Classic Bullish Engulfing Pattern:The previous candle must be bearish (Close < Open).The current candle must be bullish (Close > Open), with its body "engulfing" the previous bearish candle's body (current Open < previous Close and current Close > previous Open).High Breakout Confirmation:Additionally, the current candle's Close price must break above the High of the previous candle.Stop Loss and Take Profit Calculation:Stop Loss: Calculated as the lowest Low between the current and previous candles on the M15 timeframe, with a small buffer of 5 points.Take Profit: Set at a 1:1 ratio with the Stop Loss distance.Order Execution:If all conditions are met, a Buy order is placed with the calculated Stop Loss and Take Profit.IsOrderOpen Function:This helper function checks if there is already an open Buy order for the current symbol to prevent multiple entries.Error Description Function:Provides descriptions for potential errors that may occur during order placement, improving debugging and error handling.Summary:The script executes a Buy order based on a re-entry strategy, validated by the Classic Bullish Engulfing pattern on the M15 timeframe and confirmed by the LWMA and EMA indicators on the H1 timeframe. The script includes safety checks to prevent multiple entries, and it calculates appropriate Stop Loss and Take Profit levels based on recent price action.

Han respondido

1
Desarrollador 1
Evaluación
(35)
Proyectos
64
22%
Arbitraje
10
0% / 60%
Caducado
18
28%
Libre
2
Desarrollador 2
Evaluación
(1)
Proyectos
1
100%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
I need an expert to help me with adding more features to my existing mt4 EA I think the addition I want added to this EA is fairly simple--but I don't really understand how programming works, Contact me for a long term work, This is not the only project, I will explain the features in the inbox, Let me know if you can do it
I need someone who can copy trade from one tradovate account to another one A very bold expert that can render this service with a fast time frame, be plain and direct with your response and also let me know if you'll need anything from my end aside I pay
Hft live account 30 - 200 USD
i need a high frequency trading (hft) expert advisor, that can be used to trade on demo and live accounts icmarket and 8cap. The EA has to be highly profitable, giving daily profit. If a test version is available, please send, to foster a faster transaction. like the ones that pass prop firm and demo but adjustment where it work on live with low latency
Lihle's trades 30+ USD
``` //+------------------------------------------------------------------+ //| Hello World Expert Advisor | //| | //| This is a basic EA that buys and sells based on a simple | //| moving average crossover strategy. | //+------------------------------------------------------------------+ #property version "0.01" #property strict input int FastMA
CPI ROBOKING 30+ USD
*Strategy: CPI-Based Trading* *Instruments:* XAUUSD (Gold), UsTech100 (Nasdaq 100), USDJPY *CPI Release:* 1. *Higher-than-expected CPI:* - XAUUSD: SELL (Gold prices may drop due to potential rate hike) - UsTech100: SELL (Tech stocks may drop due to potential rate hike) - USDJPY: BUY (USD may strengthen due to potential rate hike) 2. *Meets or lower-than-expected CPI:* - XAUUSD: BUY (Gold prices may rise due
I WRITE a code i want to conect this for automatic trading through vps .and als advanced features for this code .i attached afile please watch .and give me perfect ea
Hello, i need a good programmer; to code an EA to trade the most productive forex pairs (mainly 2 for the day, and 2 for the night+gold), the strategy is based on the use of one moving average and the rsi, thank you in advance
GOODAY TO YOU I AM NEED OF A FAST, TALENTED AND HIGH QUALITY CODER TO THIS JOB FOR ME. THE EA TRADE MANAGER WILL HAVE THE FOLLOWING: STOPLOSS & TAKEPROFIT IN PIPS LOT SIZE IN PIPS NUMBER OF TRADES (1-30 TRADES MAXIMUM) PLEASE LOOK AT THE PICTURE ABOVE FOR A GUIDE
hi. I hv a strategy on tradingview need to convert to mt4/mt5 expert advisor for algo trading. would like to add some tradingview strategy setting to the mt4/mt5 EA(not included in my tradingview source code): recalculate after order is filled, order size: xx% of equity
i want a forex robot that will read chats and enter trades on its oown. i want it to be able to use all trading strategies and partterns. good risky manegmemt, i want it to forcuse on Gold and and all major forex pairs. i want it to use stop loses and take profits as the market might change direction anytime. i want to work on both mt5 and mt4

Información sobre el proyecto

Presupuesto
30+ USD

Cliente

Encargos realizados1
Número de arbitrajes0