Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I'm looking for someone who can program a Hedge Ea with the set of rules listed below. It's something that everyone in the forum can benefit from. We will make it available to everyone.
Rules:
1. The EA will only trade on one currency pair. Probably EURUSD.
2. Use a Money Managmeent system to determine lot sizes as in HedgeEA. Extern bool MoneyManagement=true/false;
3. Open trading by determining an obvious trend or momentum in one direction. This will be our first trade.
4. When opening the fist trade we also want to set a stop order in the opposite direction. This will be our hedge if the market swings against our initial trade.
5. Use trailing stop loss on profiting trades - option to adjust down to 5 pips if required.
6. Lock in profits after 10 pips profit by setting a stop loss. Then use trailing.
7. Works only on the symbol of the chart it is attached to.
8. Magic Number used.
9. Stop Order number of pips is set as a variable. ie Extern int EntryStopOrder = 10;
10. Lock in profits as a variable. ie Extern int ProfitTarget = 10; (pips)
11. Set option for backtracking (true/false)
12. Set max times to backtrack default = 3 but resets after all trades are closed. BackTrack=0 for unlimited backtracks.
Stage 1 - Get this part working first
Example 1:
This assumes that the first trade is long so the EA will need to do the opposite if the first trade is short.
Open long 0.1 lot. Set Sell stop order at -10 pips. If trade continues in our favour for at least 10 pips we lock in profit by setting a stop loss, then enabling a trailing stop and delete the sell stop order. When stop is hit we close the profiting trade. Complete. No more open trades. Start again.
Example 2:
Open long 0.1 lot. Set Sell stop order at -10 pips. If the trade swings against us before hitting our profit target, and reaches our sell stop order then the hedge trade is openned. We now have 2 trades open with 10 pips + margin difference between them. ie 14 pips between them for EURUSD on IBFX.
When one of the trades passes our profit Target (10 pips) we set a stop loss and enable the trailing stop on that profiting trade. When stop loss is hit the profiting trade closes. Let’s say for this example that the short trade hit the stop loss and we made 15 pips profit. We now have a negative trade open. Set a Sell Stop Order again for 10 pips.
If BackTracking=false then we have the negative trade open and a sell stop order in case the direction heads short again after we close our short trade.
If trade continues long then our loss is being reduced on the negative trade. We want to adjust our Sell Stop Order to follow 10 pips behind. When long trade goes into profit by 10 pips we set our stop loss to lock in our trailing stop, delete sell stop order.
Stage 2 - After Stage 1 works correctly we add this backtracking feature to the EA
Example 3:
Same as Example 2 but we add a backtracking feature.
If BackTracking=true, we set a buy stop at 10 pips from the closed trade as well as a sell stop order in case the trade goes short again. By doing this we will have 2 open trades going in the correct direction (long in this case) and this will quickly make up for the losing trade that is open (or at least part of it).
If the trade decides to go short again we re-hedge with the sell stop order.
I know it's very complicated but I think it will make a good EA. It's worth a try. Anyone who would like to try programming it please post it here for testing.
Couple of questions,
1. When the trade is in profit by 10pips, what are the intial & sliding stop loss values
2. If a trade goes againest us we open a series of hedges with +10 take profits in the other direction until the trend comes back?
Couple of questions,
1. When the trade is in profit by 10pips, what are the intial & sliding stop loss values
2. If a trade goes againest us we open a series of hedges with +10 take profits in the other direction until the trend comes back?
1. Both can be a variable. As low as 5 pips or as high as you like. Would say probably 5 pips.
2. If the trade goes against us we have an Entry Stop Order to open the hedge. Back tracking is an option to help get back into profit faster with our losing trade after we have closed one for a profit.