Re-entry buy with LWMA 5 and 10 Low

指定

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.

応答済み

1
開発者 1
評価
(35)
プロジェクト
64
22%
仲裁
10
0% / 60%
期限切れ
18
28%
2
開発者 2
評価
(1)
プロジェクト
1
100%
仲裁
0
期限切れ
0
類似した注文
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
NEED IT WITHIN ONE HOUR Adding a counter for open trades. When closed counter gets to 0 and starts runs till the input again. Also a option to just let it run once a day or for the whole day non stops My past developer wasn't able to get the close function end of the day working. The function works as follow: MONDAY TUESDAY etc.... TRUE OR FALSE When trades have been opened on MONDAY TRUE it lets them run on TUESDAY
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
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
I want to create an EA that can take bids according to information of a logic I have developed to give indication of a BUY or SELL opportunity. The EA will then be able to activate the BUY at the lowest possible position once the indicator clears it for a BUY and take bid upwards or identify the highest point and clears it for a SELL and take bids downwards. As you can see from example of JULY 2024 data to see how
Hello Im looking for professional trading developer who htf ready made trading with best and working strategy with low risk level with average of 30 to 60 percent profit margin, broker is not problem, any broker is welcomed and any trading pairs are welcomed as well
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
Hi, i will provide a dll .use it's functions develop a backend code copy trading .it should a master accounts and slave accounts based of the mapping with the copy parametsrs it should start copy trades between the master and slave .one slave should be able to copy from Mutiple master and some basic fronted access to be created using the angular js
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

プロジェクト情報

予算
30+ USD

依頼者

出された注文1
裁定取引数0