Trabajo finalizado
Plazo de ejecución 7 días
Comentario del Ejecutor
Good client, good business
Comentario del Cliente
Good Job
Tarea técnica
Project Overview: Hedging Grid EA
The goal is to create an MQL4 Expert Advisor that employs a hedging grid strategy. This means it will open both buy and sell trades, often simultaneously, and will add to positions at predefined intervals as the price moves.
Core Strategy:
Grid Trading: The EA places new pending orders (BUYSTOP, SELLSTOP) at a set distance from existing trades.
Hedging: It manages buy and sell trades independently, allowing them to run at the same time.
Lot Sizing: It can use a multiplier (martingale-style) or a fixed increment to increase the lot size for new grid orders.
Profit/Loss Management: It closes trades based on several conditions:
Profit target for a single direction (e.g., close all buys).
Combined profit target for both directions (hedged basket).
A hard stop-loss based on total drawdown.
Dynamic Orders: It uses trailing stops on open positions and can also "trail" its pending orders, adjusting their entry price as the market moves.
Visual Interface: The EA displays key information directly on the chart, including profits, average entry prices, and trading signals.
Part 1: EA Settings (Global extern Variables)
These are the user-configurable inputs. The programmer needs to declare these at the top of the file so they appear in the EA's settings window in MetaTrader.
Order Management:
Magic: int - A unique magic number to distinguish this EA's trades from others.
slippage: int - The maximum allowed slippage in points for order execution.
Allow_BUY, Allow_SELL: bool - Master switches to enable or disable buy and sell trading.
Open_order_on_trend: bool - A setting to control grid order placement logic (either with or against the trend).
Lot Sizing:
Order_lotsize: double - The initial lot size for the first trade in a series.
Multiply_lotsize_by: double - A multiplier for the next lot size (e.g., 1.5 for a martingale strategy).
Increase_lotsize_by: double - A fixed amount to add to the next lot size (used if the multiplier is 1.0).
Round_lotsize_to_decimals: int - The number of decimal places to round the lot size to (e.g., 2 for standard lots).
Grid & Order Spacing:
First_step: int - The distance in points from the current price to place the first pending order.
Distance_between_orders: int - The minimum distance in points between orders in the grid.
Minimum_price_distance: int - The minimum distance from the current price for subsequent pending orders.
Move_step: int - The number of points the price must move before a pending order is trailed (modified).
Stop Loss & Take Profit:
Stoploss, Takeprofit: int - The initial Stop Loss and Take Profit in points for each individual order.
Trailing_type: int - The type of trailing stop to use (0 = disabled). The programmer will need to implement the logic for different types if required.
Trailing_step: int - The step, in points, for the trailing stop.
Minimum_trailing_profit: int - The minimum profit in points an order must have before the trailing stop is activated.
Basket Closing Conditions:
Profit_for_closing_1_direction: double - The profit amount in account currency to close all trades in one direction (e.g., close all buys when their total profit reaches $50).
Profit_for_closing_2_directions: double - The profit amount to close all trades (buys and sells) when the combined profit of the hedged basket reaches this target.
Loss_for_closing: double - A negative dollar amount that triggers the closing of all trades in one direction (e.g., close all buys if their total profit reaches -$100).
Maximum_allowed_loss: double - A negative dollar amount that prevents the EA from opening new trades in a direction.
Close_loss_by_drawdown: double - A profit threshold. If the profit of either side drops below this, the EA switches to its "hedged close" logic.
Auto_calculated_profit: double - A setting to automatically calculate the profit target based on lot size and tick value.
Indicators & Timing:
Opening_1_order_on_indicators: bool - If true, the very first order will only be placed if RSI conditions are met.
Timeframe_indicator: int - The timeframe to use for the RSI calculation.
RSI_Period, Oversold_zone, Overbought_zone: int - Standard RSI settings.
Delete_Orders: bool - Enable/disable the scheduled deletion of all orders.
DeleteHour: int - The server hour (0-23) to delete all orders.
Visuals:
Font_size: int - The font size for text displayed on the chart.
Color_information: color - The color for the informational text.
Part 2: Main Program Structure (OnInit, OnDeinit, OnTick)
int OnInit(): This function runs once when the EA is first attached to a chart. Its purpose is to set up the visual display. The programmer should write code here to create all the necessary text objects (OBJ_LABEL) on the chart for displaying Balance, Equity, Profits, etc.
void OnDeinit(const int reason): This function runs once when the EA is removed from the chart. It should contain a cleanup routine to delete all chart objects created in OnInit().
void OnTick(): This is the heart of the EA, running on every new price tick. The programmer should implement this function exactly as it appears in the refactored code, with the main logic flow calling the 9 helper functions in sequence.
Part 3: Helper Function Implementation
The programmer should create each of the 9 functions called by OnTick.
HandleScheduledOrderDeletion(): Simple function. Check the Delete_Orders setting and the current server hour. If they match DeleteHour, call a function to close/delete all orders.
ProcessOpenOrders(...): This is a critical data-gathering function. It must loop through all orders, filter them by the current symbol and magic number, and then calculate all the key metrics (counts, lots, profits, price points) needed by the other functions.
UpdateAveragePriceObjects(...): This function should first delete the old "SLb" and "SLs" arrows from the chart. Then, if buy or sell orders exist, it should create new arrows (OBJ_ARROW with SYMBOL_RIGHTPRICE) at the calculated averageBuyPrice and averageSellPrice.
ApplyTrailingStops(...): Loop through all open trades. For each trade, calculate the potential new trailing stop loss price. If this new price is better than the current one (higher for buys, lower for sells) and meets the minimum profit condition, modify the order using OrderModify().
ManageProfitAndLossClosing(...): Implement the series of if statements to check the various profit and loss conditions against the targets. If a condition is met, it should call the CloseOrders() function with the correct parameter (1 for buys, -1 for sells, 0 for all).
UpdateTradingSignals(...): This function updates the chart labels ("Char.b", "Char.s") that show if trading is allowed. It uses ObjectSetText() with special Wingdings font characters to display green checkmarks or red crosses.
ManagePendingOrders(...): Implement the logic to place new grid orders. This involves calculating the lot size, determining the entry price based on distance rules and RSI, and checking if there is enough free margin before calling OrderSend().
ModifyPendingOrders(...): Implement the "trailing pending order" logic. Calculate the ideal new price for the existing pending order and compare it to its current price. If the complex shouldModify condition is met, call OrderModify() to update the order's entry price.
UpdateChartInformation(...): Update all the informational text labels on the chart (Balance, Equity, ProfitB, etc.) with the latest values calculated in ProcessOpenOrders.
Part 4: Required Utility Functions
The programmer will also need to create the functions that perform the actual trading actions and calculations.
CloseOrders(int direction): This function will loop through all orders. Based on the direction parameter (1, -1, or 0), it will use OrderClose() on the matching trades.
DeleteOrders(): Similar to CloseOrders, but it will use OrderDelete() for pending orders and OrderClose() for open market orders.
TradingHours(): A function that checks the current server time against user-defined start and end hours to determine if the EA is within its allowed trading session.
CalculateTrailingStop(...): The logic to calculate the trailing stop price. This could be as simple as Bid - Trailing_Stop_Points for a buy order.
UpdateChartLabel(...): A small helper function to make creating and updating the text objects in OnInit and UpdateChartInformation cleaner and less repetitive.
Han respondido
1
Evaluación
Proyectos
323
30%
Arbitraje
34
26%
/
65%
Caducado
10
3%
Trabaja
2
Evaluación
Proyectos
175
25%
Arbitraje
23
13%
/
78%
Caducado
16
9%
Libre
3
Evaluación
Proyectos
19
16%
Arbitraje
5
40%
/
40%
Caducado
0
Libre
4
Evaluación
Proyectos
977
74%
Arbitraje
27
19%
/
67%
Caducado
100
10%
Libre
Ha publicado: 1 artículo, 6 ejemplos
5
Evaluación
Proyectos
137
52%
Arbitraje
5
40%
/
60%
Caducado
0
Libre
6
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
7
Evaluación
Proyectos
126
40%
Arbitraje
18
44%
/
56%
Caducado
33
26%
Trabaja
8
Evaluación
Proyectos
67
37%
Arbitraje
5
40%
/
40%
Caducado
1
1%
Libre
9
Evaluación
Proyectos
507
40%
Arbitraje
159
17%
/
74%
Caducado
99
20%
Trabajando
10
Evaluación
Proyectos
564
35%
Arbitraje
81
31%
/
44%
Caducado
204
36%
Libre
11
Evaluación
Proyectos
31
13%
Arbitraje
13
0%
/
77%
Caducado
9
29%
Libre
12
Evaluación
Proyectos
35
23%
Arbitraje
4
0%
/
50%
Caducado
2
6%
Trabaja
13
Evaluación
Proyectos
13
23%
Arbitraje
7
0%
/
71%
Caducado
3
23%
Trabaja
14
Evaluación
Proyectos
945
47%
Arbitraje
309
58%
/
27%
Caducado
125
13%
Libre
15
Evaluación
Proyectos
244
74%
Arbitraje
7
100%
/
0%
Caducado
1
0%
Libre
Ha publicado: 1 artículo
16
Evaluación
Proyectos
90
43%
Arbitraje
4
0%
/
100%
Caducado
3
3%
Trabaja
17
Evaluación
Proyectos
13
38%
Arbitraje
1
0%
/
100%
Caducado
1
8%
Libre
18
Evaluación
Proyectos
1
0%
Arbitraje
0
Caducado
0
Libre
19
Evaluación
Proyectos
66
12%
Arbitraje
12
58%
/
42%
Caducado
1
2%
Libre
20
Evaluación
Proyectos
7
0%
Arbitraje
3
0%
/
100%
Caducado
2
29%
Libre
21
Evaluación
Proyectos
553
50%
Arbitraje
57
40%
/
37%
Caducado
227
41%
Trabaja
22
Evaluación
Proyectos
2
0%
Arbitraje
2
0%
/
50%
Caducado
0
Libre
23
Evaluación
Proyectos
13
0%
Arbitraje
23
0%
/
78%
Caducado
4
31%
Libre
24
Evaluación
Proyectos
56
34%
Arbitraje
15
27%
/
60%
Caducado
1
2%
Trabaja
25
Evaluación
Proyectos
2
0%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
Need simple EA for XAU/USD
30+ USD
//+------------------------------------------------------------------+ //| Simple XAUUSD EA | //+------------------------------------------------------------------+ input double LotSize = 0.01; input int StopLoss = 500; // in points input int TakeProfit = 1000; // in points input int MAPeriod = 20; int maHandle; int OnInit() { maHandle = iMA(_Symbol, PERIOD_H1, MAPeriod, 0, MODE_SMA
Python MT5 Forex Trading Bot Development
30 - 49 USD
Hello, I need a Python-based MT5 forex trading bot developed. The bot should connect to MetaTrader 5, execute trades based on a predefined strategy, and support standard risk management features such as stop loss, take profit, and position sizing. Requirements: MT5 integration using Python Automated trade execution based on provided strategy rules Configurable risk management settings Support for major forex pairs
Hi, I'm Barak, founder of FX Trade Africa, a trading automation company based in Africa. I'm looking for a serious EA developer for a long-term business partnership — not a one-time paid job. IMPORTANT: This is not a paid order. I am looking for a long-term partner who believes in the model and wants to build something serious together. Compensation will be based on profit sharing from funded accounts — details
### ** Main EA File** - `InstitutionalTrendPullbackScalper.mq5` **Core Features Implemented:** **Multi-Timeframe Analysis** - M15 trend filter (EMA20 > EMA50 for uptrends) - M5 entry signals with 5-condition confirmation - Independent indicator sets for both symbols **Advanced Entry Logic** - RSI reversal detection (crosses thresholds) - Price pullback zone validation - Bullish/bearish candle close confirmation -
I need developer who Can perfectly build me a layout of Ninjatrader 8 (NT8) to look and feel the same on SierraCharts? I currently use NT8 but I want to start using SierraCharts because its more robust than NT8, but I don't want to have to worry about programming SierraCharts. How much would this cost? Thank you
Automate my trading
100 - 300 USD
i want a trading bot that take trade auto and make 5% profit daily and stop with in 24 hours not more then that at least the bot give me more then 2% not less then that like a ai agent if it make any loss that agent have to take care of it i need only 5 % profit
I am looking for an EA for MT5 which is stable for long period. should make minimum 20% per month and DD should be less than 10% first send me your backtest reports for last 5 years with real ticks. budget is negotiable based on the quality of the EA. source code should be delivered at the end. Please dont apply without sending backtest report as mentioned above, in other case offers would be rejected
I do not have any startegy, and I want you to create one with your experience, you will provide me EA along with source code. you may use Grid or any logic, but the EA should keep generating profit during Newyourk and Asian session
XAUUSD (Gold) Institutional Trading EA – MT5 NEEDED
30 - 300 USD
I am looking for an experienced MQL5 developer to build a professional-grade Expert Advisor (EA) for MetaTrader 5. The strategy is based on liquidity sweeps, market structure (Break of Structure), and institutional concepts (order blocks), specifically optimized for XAUUSD (Gold). This is not a basic bot. I need a structured, optimized, and reliable system suitable for live trading after testing
Binance Ai Trading Bot $US700 budget negotiable
700 - 3000 USD
I need an Ai trading bot for Binance and BTC on MT5 that also uses order flow data. It should also make use of TSI- Temporal indicator sampling and also it should make use of fundamental analysis in the process of signal generation
Información sobre el proyecto
Presupuesto
100 - 150 USD
Plazo límite de ejecución
a 7 día(s)