Find Jobs
Hire Freelancers

A simple hedging EA

$30-100 USD

Cancelled
Posted almost 14 years ago

$30-100 USD

Paid on delivery
This Project is to code a simple Forex Expert Advisor in Metatrader MQ4 language to provide an automatic hedging system for the EUR CHF pair. The EA will automatically place short hedging trades when the EUR CHF pair falls below a specific price, and automatically close them as the price returns to normal? ## Deliverables I run a Forex Grid Trading system using the EUR CHF pair. I have a lot of open long trades starting at 1.5200 which are now in massive drawdown as a result of the crisis in the Euro. I have had to start manually placing hedging trades to prevent a margin call on my Forex broker account. Currently, I am hedging manually below 1.4000, but it is very difficult to manage the? hedge trades 24 hours a day when the market moves. I need to automatically place and close? short? hedge trades when the EUR CHF falls below a certain price which will be a variable. So, I need an EA to place the orders? for me, as the price moves down, and I need the EA to close the orders when the price goes back up. I can't monitor my account 24/5, and I'm missing opportunities to close trades that are now left hanging and making the problem worse as the price moves up. So,? I need a? simple EA to watch over my account. For example, If the price of the EUR CHF falls from 1.4000 to 1.3000 I need the EA to place trades at say, 40 pip (variable) intervals all the way down to? 1.3000. This will fully hedge me for all the open long trades to 1.5000 if the price dives to 1.2000 or 1.1000 etc. BUT, if the price starts to rise at 1.3750, I don't want to leave open short trades hanging that would make a loss to close out later if the price moves up very quickly back to and above 1.4000. In order to prevent this situation, the EA needs to allow for some hysteresis. Let's take an example, using? a 40 pip grid? :- The price starts to fall below 1.4000, and so the EA opens the first short hedge trade at 1.4000, with no stop loss and no take profit. The price falls further, and the EA opens a second hedge trade at 1.3960, again with no stop loss and no take profit. If the price goes below 1.3960, then we wait and see if it falls below 1.3920, when we would open up a new short trade at 1.3920, with no stop loss and no take profit, and so on as long as the price keeps falling. BUT, at the? price between 1.3960 and 1.3920 if the price goes back up above 1.3960, we need to immediately set the Stop Loss of the 1.4000 Short trade to break even. The same applies to every open short hedge trade above the current 40 pip grid range. So, we close trades out in a controlled manner as the price moves back up from wherever it fell to. This will obviously leave 1 open? short trade if the price carries on going up, but this is OK, and a necessary part of the hedging system. The main? goal is to prevent any more than 1 orphaned? short trade? no matter how low the price drops, or how fast the market changes. THE EA MUST? PRESERVE THE INITIAL HEDGING ENTRY POINT, so it must not close the 1.4000 short trade until the price has moved above 1.4001, and so it can replace the 1.4000 trade if the price falls back below 1.4000.? I think this system will work, and will prevent total meltdown if the Euro completely collapses against the? Swiss Franc, which is still a real possibility. The EA must have some variables :- STARTHEDGE = price at which hedging begins STOPHEDGE = price at which hedging stops HEDGETYPE 0 = place long trades, 1 = place short trades? HEDGEINTERVAL =? number of pips between hedge trades HEDGEPROFIT =? optional pips profit? at closing hedge trade (default = 0) I think I have covered everything here, but good Forex MQ4 programmers may have some additional suggestions. Cheers, Malcolm.
Project ID: 3501732

About the project

2 proposals
Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average $62 USD for this job
User Avatar
See private message.
$42.50 USD in 14 days
5.0 (5 reviews)
0.8
0.8
User Avatar
See private message.
$81.60 USD in 14 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED KINGDOM
Chapel-en-le-Frith, United Kingdom
5.0
5
Member since Oct 17, 2008

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.