Forex Factory (https://www.forexfactory.com/forum.php)
-   Trading Discussion (https://www.forexfactory.com/forumdisplay.php?f=11)
-   -   Hedge Trade-panel (https://www.forexfactory.com/showthread.php?t=701784)

billv Jan 20, 2020 11:46pm | Post# 141

1 Attachment(s)
I can confirm that the spread is not being charged when we hedge using this method.

As you can see in the video, our equity immediately before I hedged was $26,286

The hedge order temporarily brought the equity down to $26271
and when I closed the hedge, the equity changed back to what it was before the hedge, $26286
bandicam 2020-01-21 15-35-37-595.mp4

GreyInvest Jan 21, 2020 1:28am | Post# 142

1 Attachment(s)
I confirm it too Description the same as you @billy

Click to Enlarge

Name: Free Hedge Proof.jpg
Size: 187 KB

4fxonly Jan 21, 2020 3:29am | Post# 143

I can confirm that the spread is not being charged when we hedge using this method. As you can see in the video, our equity immediately before I hedged was $26,286 The hedge order temporarily brought the equity down to $26271 and when I closed the hedge, the equity changed back to what it was before the hedge, $26286
I confirm it too Description the same as you @billy
Well, I'm glad you got your doubts sorted out for yourselves, guys. Since I started using this EA I always saw by glancing that the profit was never decreased after hitting the final button, but your statements made me think there could be difference between brokers.
I think I can safely say that, if there was a leader-board, the Hedge trade panel would deserve one of the top places, even more after bill's improvements.

GreyInvest Jan 21, 2020 1:29pm | Post# 144

{quote} {quote} Well, I'm glad you got your doubts sorted out for yourselves, guys. Since I started using this EA I always saw by glancing that the profit was never decreased after hitting the final button, but your statements made me think there could be difference between brokers. I think I can safely say that, if there was a leader-board, the Hedge trade panel would deserve one of the top places, even more after bill's improvements.
Yes, but anyways, it is better to double-check before using it with real money.

Im not that opinion that this great tool should be over-promoted, because then some people will start to sell imitates of this panel - or newbies will thing this is the holy grail or ...

It should be a "secret" for us furthermore.

Cheers

Mr4x86 Jan 23, 2020 5:39am | Post# 145

Hi Guys,

Amazing concept, basically gives you the advantage of using a brokers low-spread option without having to pay commission. I tested it on Pepperstone and it worked...

Quick question - you reckon this can be adapted to cTrader? Or does that handle orders a bit differently? Only reason I ask is that's what I use for trading..

newbi3 Jan 26, 2020 1:33pm | Post# 146

1 Attachment(s)
i have got a real live account sitaution,my martingale gone wrong,plz check and give me suggestion,how to deal with it? thanks.
check my FFX account,investor password is new1234
Click to Enlarge

Name: 2020-01-26_22h16_23.png
Size: 53 KB

billv Jan 26, 2020 9:06pm | Post# 147

1 Attachment(s)
i have got a real live account sitaution,my martingale gone wrong,plz check and give me suggestion,how to deal with it? thanks. check my FFX account,investor password is new1234
Which broker are you using?
in Mt4 click on File and then login to trade account and give me the server name

By looking at your picture, it looks hard to recover because the trade size weight ratio is at the bottom.
Use this indicator, it will give you an idea where the break even point is on the chart.
It draws a line and it also tells you the number of pips for BE
me_Breakeven_Line v2.4h.ex4

billv Feb 5, 2020 5:25pm | Post# 148

2 Attachment(s)
New Version, please test it and let me know if there are any issues.
As usual, extract everything into the MQL4/Experts folder and restart MT4.
This is important, if you are copying all files on top of a previous installation, then allow the old files to be overwritten (otherwise it will not pickup the changes we have done since the last update).


This version has
1. a Break Even Button
There is an input in the settings for the default status of this button (ON or OFF)
If you set it to OFF in the settings you can toggle it ON and visa versa.

2. An automatic Hedging feature (to use instead of the SL).
When input Automatic Hedging=true, the EA will hedge an open trade when it reaches a predetermined number of -ve pips.
(enter the hedgingSL pips in the settings)

3. Automated Trade size.
If the input "Automatic Trade Size=true) the EA will use the following 2 inputs plus our account equity to calculate our trade size.
Trade1PipsForRiskPercent
Trade1RiskPercent
It will then adjust the trade size shown in the LOTS window of the panel.
If you don't like the default size you'll get, then change the input Trade1PipsForRiskPercent to 200 or 300 etc.
The EA accounts you'll see in my trade explorer, have this input set to 800 because for this type of trading I want the trade size to be very small.

I use this feature in all of my trading (manual + automated) because pip value differs significantly between currencies and I want my traded size to change up Or down automatically without me having to run a spreadsheet to see what size I will use for the various pairs I trade.
The other advantage is that it looks at our equity and it will increase our trade size as our account grows.
This makes our trading more efficient because we are not stuck in 1 trade size for too long.
i.e. We don't over-trade in some pairs (taking too much risk) and Under-trade in other pairs (reducing our profits).

4. Automatic Closing of orders using the "Orders By CloseBy" function
In Symbol Basket bas4 I have added a new input: "Close Orders By CloseBy"
When this input = true, the EA basically automatically activates the HEDGE button
and then the CLOSE HEDGED button and closes all trades using the CloseBy function
So when 3 or more trades reach the TP target we have entered in the bas4 settings,
the EA will close all (same currency)trades using the Closeby function.
If this input=false the EA will close the trades normally.
HedgePanel15.zip
Name:  HedgePanel15.png
Views: 813
Size:  6 KB

4fxonly Feb 6, 2020 3:05am | Post# 149

New Version...
Amazing, Bill! This EA is getting more and more sophisticated... Thanks very much for taking up on my request. Just a question about the last point: why is 3 the smallest number of trades to activate the automatic closing? In my case, at times I don't need to open more than 2 if the price moves quickly in the right direction. I wouldn't mind to still take advantage of this function if at all possible.

billv Feb 6, 2020 3:46am | Post# 150

{quote} why is 3 the smallest number of trades to activate the automatic closing? In my case, at times I don't need to open more than 2
When I added this feature I was only thinking of trade recovery which could be 5 or 10 or more trades.
Have a play with it, if you are only looking to close 1 or 2 trades quickly when you are in profit,
the other 2 basket closures should do it quickly enough.
However I can add this feature to the other levels as well.
I will do it as soon as I have confirmation that all other functions are Ok.

Btw, One feature which I forgot to mention for anyone who is trading Gold, the Dax or other indices
is the addition of a section for special instruments like Gold, Copper, Dax etc.
Those inputs are specifically there for the automatic trade size calculation
so if you change your MT4 chart to Gold or the Dax the dashboard should adjust its trade size according to the divisor input.
For my broker the XAUUSD divisor needs to be 10 otherwise my trade size would be x10 what it should be.

Genry_05 Feb 7, 2020 2:28pm | Post# 151

New Version, please test it and let me know if there are any issues. ...
Good day, Bill!
The first time I installed the panel 5 versions and a little trading.
What I encountered at startup: stopping EA, if the trade button is not turned on, it's a little harsh
There is probably enough message that the adviser is disabled.

billv Feb 8, 2020 12:40am | Post# 152

1 Attachment(s)
{quote} Good day, Bill! The first time I installed the panel 5 versions and a little trading. What I encountered at startup: stopping EA, if the trade button is not turned on, it's a little harsh There is probably enough message that the adviser is disabled.
Hello Genry
I don't understand the problem, did you install the latest version?
Maybe the EA didn't compile, sometimes metaeditor looks for the included files in other MT4's and if they are not there it will not compile correctly.
I had this problem with windows 10.
Please remember to extract all files and then to copy everything ( files+folders) into the experts folder.
and to overwrite the old files.
Alternatively, you can compile the EA elsewhere and then simply copy the single Ex4 file into your experts folder.
Its stupid how the EA is split into so many files, but this is how the original EA was.
I'm attaching a compiled version.
HedgeTradePanel15.ex4

peterke Feb 11, 2020 1:44am | Post# 153

{quote} Hello Genry I don't understand the problem, did you install the latest version? Maybe the EA didn't compile, sometimes metaeditor looks for the included files in other MT4's and if they are not there it will not compile correctly. I had this problem with windows 10. Please remember to extract all files and then to copy everything ( files+folders) into the experts folder. and to overwrite the old files. Alternatively, you can compile the EA elsewhere and then simply copy the single Ex4 file into your experts folder. Its stupid how the EA...
Billy, hi, I had the same problem with Genry, the compiled ex4 loaded properly.
tks for sharing the upgrade

billv Feb 11, 2020 2:36am | Post# 154

{quote} Billy, hi, I had the same problem with Genry, the compiled ex4 loaded properly. tks for sharing the upgrade
Hi, Pete
Its not a fault of the software, its windows, for some reason
(and only sometimes)
the MT4 editor looks for the included files in different MT4 installations.

I only experience this problem with Windows 10 because it uses user specific folders for MT4
Most likely it happens when you have more than 1 MT4 installation on your PC.
You can get around the issue by opening MT4 editor and clicking on "open file folder".
Then you will see which MT4 is your current working MT4 for compiling purposes.

To make things more confusing, if you reboot the computer
or if you restart Mt4 the compiler's working folder could change.
Anyway, MT4 is only doing this once.
The compiled version does not need the "include" files.

billv Feb 13, 2020 6:51pm | Post# 155

3 Attachment(s)
New Version 16

I added a new input: CloseOrdersByCloseby2 so if you have 2 trades open, they can close using this method.

I'm attaching
a zipped file with the source file + associated files
a compiled version of the EA ( this is the only file you'll need for trading)
a settings file

Please Note: the settings file is set for automatic trade size 100:1
This means that when you trade the GBPNZD and you have a $10K AUD account then you will get a trade size of 0.1
For a $1K account the trade size for this currency pair will be 0.01 and so on.

For a different currency, the trade size will be slightly different but it will be based on the same risk %
When you change the chart pair, the trade size displayed in the LOTS window will change automatically.
Have a play with it, I believe this is a very useful feature.
HedgeTradePanel16.zip
HedgeTradePanel16.ex4
HedgePanelSettings.zip

4fxonly Feb 14, 2020 2:34am | Post# 156

New Version 16 ...
Better and better, Bill. Thank you.

SkullCandy Feb 14, 2020 3:22am | Post# 157

Interesting thing it is... Need to properly study more, keep up the good work and trade safe

billv Feb 14, 2020 3:43am | Post# 158

2 Attachment(s)
{quote} What I encountered at startup: stopping EA, if the trade button is not turned on
Ok Mr Genry,
the alert (MT4 AUTOTRADING is OFF) has been removed in V17
HedgeTradePanel17.zip
HedgeTradePanel17.ex4

billv Feb 26, 2020 4:01pm | Post# 159

I would like to remind people of the basket closing feature of the EA which is very useful for manual trading
and for fast moving currency pairs, like the GBPJPY or GBPNZD or even for indices like the DE30

Here is a reply I gave to 1 trader
This Dashboard is probably ideal for the DAX but I would use it with a fixed TP + basket closure TP.
For example, I would set the standard TP at 11 pips and I would let the Symbol basket TP function close 50% of the trade after 5 or 6 pips of profit.

The remaining 50% will then be left to close with the normal TP of 11.
In order to do this, you can set the
input SymbolbasketTradesBelongToBasket=True
Input PercentageOfTrade1ToClose=50
and then set the input SymbolBasketCashTakeProfit to the $ value of 6 pips.
There is no input for actual pips in the basket closing section of the EA at present but you can estimate what the 6pip TP is in $ and enter it there
or you can enter a % of the account size.

When the trade becomes profitable by 6 pips, the EA will then close half trade so this puts some money into your pocket
but it also reduces the loss if price reverses and hits your SL.
Its a numbers game and if your trade entries are good, by using this technique you will be winning more than you will losing.

Now regarding the % TP
If you use automated trade size and set the inputs
AutomaticTradeSize=true
Trade1PipsForRiskPercent=100
Trade1RiskPercent=1 then your trade size will be variable
and if you set in the symbol basket input
SymbolBasketCashPercentageTatget=0.1
your 0.1% TP will always be reached at the same pip number.
So regardless of which currency you use, since your trade size varies based on actual pip value then the 0.1% will be reached at the same pip distance.
The advantage of the autoatic trade size + % TP is that as your account grows, so does your trade size and your TP,
so as your account grows, you don't have to keep changing manually your trade size and TP.
Ideally the EA should have had ADR based TP, because then our TP would be based on the ability of each pair to reach our TP target,
but this idea is for a future EA version.

simnz Mar 1, 2020 10:55pm | Post# 160

Hi Billy,

I am basically a futures options trader. You can find my journal here.

https://www.forexfactory.com/showthr...5#post12782785

I am now looking for a rapid trade simulator , indicator or an EA, which can re-run the old trading sequence so that I can see whether instead of currency options I can shift to Hedging in same symbol using your EA.

https://www.forexfactory.com/showthread.php?t=983601

i feel it would be worthwhile developing this indicator or an EA as well simultaneously to get a probable plot to test the EA as to at what gaps should we test lock and at what points should be release the locks.

Hedging needs ideal candidates who have strong mean-reversion tendancy and this simulator will help identify symbols as well and then use those symbols for further testing on your EAs.

rgds
simnz


© Forex Factory