Hedging EA with partial profits and loss

工作已完成

执行时间9 天
客户反馈
Great EA. Very unprofessional. Project extended 2x. Requested more cash for underestimating workload after negotiation. Did not read job card before accepting. Late and double-booked meetings

指定

This hedging system requires a simple step rule to open and close trades.

First trade is opened manually by the trader, the EA will control everything after this step. 



Each trade has a simple command system

: #1  Trade will open a new position at X amount of points in profit ( buy will open a new buy)

: #2  Trade will break even after opening a new trade and trail with X amount of points (trailing stop should only move once a new trade is activated) each trade steps its trailing stop one section at a time

: #3  This will continue along with the trend until a reversal (this is where a hedge will form)

: #4  If a trade runs X amount of points in the loss it will open a new opposite position - Hedge ( buy will open a sell) If in a trend and several trades have been running and trailing profits, the reversal will trigger opposite position and all accumulated profits will be closed. At this point, you should have banked a few profitable positions and will now have 1 buy and 1 sell position on the chart with a space of X amount of points in a locked loss.

: #5 Trade will breakeven after opening a new opposite position 



This will allow a sequence to form and should run simply 



Partial loss and profit closures

: #1 If the sequence is hedged and there are two opposite trades locked in a loss the EA will wait for either position to run into the profit and open a new trade. 

: #2 In this case there is no trailing stop because the sequence is hedged, so once either position is x amount of points in the profit and the positive trade opens a new order (buy will open buy) Then the EA will close the first positive trade, take these profits - keep a share of the profits and give the rest back to the losing trade to reduce the outstanding lot size

: #3 The losing trade will keep taking partial losses as the new trades start to take profit 

: #4 This sequence usually completes itself after 4 wining trades and would have assisted the losing trade in reducing its loss

: #5 In the mean time for every positive position closed, a portion will be banked so the account balance will increase and the losing trade will be reduced slowly and systematically without taking a major loss on the account balance 



Example 



Buy at price 1000 for 1 lot

Buy at price 1100 for 1 lot  (first buy breaks even)

Buy at price 1200 for 1 lot (Second buy breaks even - first buy places SL at price 1100)

Buy at price 1300 for 1 lot (Third buy breaks even - First and second buy places SL at price 1200)  - Trend reverses back to 1200, now EA places a hedge at previous mark price 1200

Sell at price 1200 for 1 lot (Third buy breaks even, Second buy takes 100 points profit, first buy takes 200 points profit - Forth buy at price 1300 in now 100 points in the loss



So now the account is up 300 points in total and we are running a 100 point losing hedge 



Price continues to fall to price 1100. 

Sell position at 1200 is now in the profit of 100 points. - Buy position at 1300 is now in the loss of 200 points. 

EA will now remove sell position at 1200 and take $100 profit - keep only $20 and give $80 back the buy position running a $200 loss. Now the loss is reduced to $120 

This partial close will be closed as a LOT portion = We bought 1 lot at price 1300 we reduce the loss by 0.20 = Remaining loss is now 0.80

Another positive trade will reduce this loss even further and this will continue on until the trade is totally reduced and closed.

If price reverses again and continues higher, the remaining loss on the buy position will breakeven and be replaced by a new buy of 1 lot

反馈

1
开发者 1
等级
(22)
项目
21
10%
仲裁
4
25% / 75%
逾期
0
空闲
2
开发者 2
等级
(283)
项目
354
29%
仲裁
37
27% / 65%
逾期
10
3%
已载入
3
开发者 3
等级
(443)
项目
570
37%
仲裁
106
39% / 33%
逾期
17
3%
空闲
4
开发者 4
等级
(111)
项目
183
25%
仲裁
25
16% / 76%
逾期
16
9%
空闲
相似订单
Freelance Task — EA Recovery Layer Hello. I have a ready-made MQL5 EA. The signals, SL/TP and lot calculation should essentially not be touched. I need a recovery system added. I am not a programmer — below is how the robot should behave. What stays Entry only from an EA signal. Stop-loss is not a new signal. Trailing is already built into my EA — recovery does not implement its own trailing. If trailing is disabled
Should be as it but no alarms, also we need to add a deep search so he can see all the preves candles and a memory function so its not slowing down the indicator. for higher time frames daily 4h 1h around 365 days and for lower time frames we do up to 20k bars but both flexible so i can change it later. the memory is important so the indicator is not always recalculating everything when a new candle shows especially
Hi, I need an experienced NinjaTrader 8/NinjaScript developer to finish or rebuild an automated futures strategy, ideally by the end of this week. I already have the complete TradingView Pine Script reference strategy, an existing ~2,000-line NinjaScript implementation, Playback logs, and known historical benchmark trades. MOST IMPORTANT REQUIREMENT: TRADINGVIEW ↔ NINJATRADER PARITY. The Pine Script is the reference
PHANTOM PROTOCOL V1 35 - 150 USD
PHANTOM PROTOCOL V1 – MT5 EXPERT ADVISOR SPECIFICATION Develop a professional MetaTrader 5 (MT5) Expert Advisor named “PHANTOM PROTOCOL V1”. PRIMARY MARKET: - XAUUSD (Gold) - Designed primarily for M15 and H1 timeframes. - The EA must work with both 3-digit and 2-digit gold pricing where applicable. TRADING LOGIC: Use pure price-action and market-structure analysis rather than relying on a single indicator. The EA
I need an experienced MQL5 developer to build a prototype MT5 Expert Advisor called RiskLock. The software should enforce user-defined trading risk rules before trades are executed. It should support risk percentage or fixed monetary risk, calculate position size using account equity, entry price, stop loss, tick value and contract specifications, block or reduce oversized trades, and include daily loss limits
Project Overview I have an existing MT5 Expert Advisor (EA) written in MQL5. The source code ( .mq5 ) will be provided. The underlying strategy is a trend-following system that performs well during trending market conditions, but requires professional quantitative research to improve its ability to identify and avoid highly sideways/range-bound market conditions. The objective of this project is not to build a new EA
Most of the expert is already coded . Create a panel to show the Ratio for the Range . Trigger is based on ratio . Show Distribution / project starts after we clear Distribution
Title: Simple background trading bot for my Oanda account (v20 REST API) Overview Hi, I need a simple, lightweight event based standalone trading bot that connects directly to my Oanda account using broker’s standard REST API (V20 account) via VPS The bot just needs to look at group of 5 currency pairs (manually selectable and adjustable) in different 4 baskets, do some basic percentage math every period, and place
Gold hunter v5 30+ USD
*TITLE:* 5 Trades EA - EMA20/50 + RSI - Safe for Small Account *SPECIFICATION:* I need MT5 EA - Source Code .mq5 *Logic:* Buy: EMA20 > EMA50 and RSI(14) 45-70 Sell: EMA20 < EMA50 and RSI(14) 30-55 Timeframe M15, Symbol XAUUSD and all Forex *Trade Management:* Max 5 trades at same time. Fixed lot 0.01. No martingale. No lot increase. Distance between trades 150 points. Do not open all 5 at same price. Max 5 total
I need an Expert Advisor (EA) developed for MetaTrader 5 (MT5) tailored for trading on Exness accounts. Account & Server Details: Trading Platform: MetaTrader 5 (MT5) Broker: Exness Execution Type: Market / Pending Orders Account Type: [Specify: Standard / Pro / Raw Spread / Zero] Target Instruments: [Specify pairs, e.g., XAUUSD, EURUSD, BTCUSD] Strategy Requirements: Entry Rules: [Insert your buy/sell entry

项目信息

预算
30 - 50 USD
截止日期
 1  10 天