Stop Out: Whaaa?

Hi guys,
I am very confused about something. Why do I get a stop-out when back-testing the following scenario:

  1. I simultaneously go long AND short on 5 lots of EURUSD
  2. Due to the bid/ask spread I am left with a slightly negative profit.
  3. Regardless of market performance my balance will not change because all I have are two opposing trades. (Correct?)
  4. A few years later I am kicked out of the trade through Stop Out. (Why??)
    :confused::confused::confused:
    Here are the results from MetaTrader strategy tester:

The columns are Time, Type, Order, Size, Price, S/L, T/P, Profit, Balance

1	2000.01.20 00:00	buy	1	8.00	1.0123	0.0000	0.0000	0.00	10000.00
2	2000.01.20 00:00	sell	2	8.00	1.0120	0.0000	0.0000	0.00	10000.00
3	2003.02.10 00:00	close at stop	2	8.00	1.0818	0.0000	0.0000	-64760.00	-54760.00
4	2003.02.10 00:00	close at stop	1	8.00	1.0815	0.0000	0.0000	55360.00	600.00

Even if I donā€™t get stopped out I lose more money the longer I keep the 2 orders open. Why is this? Does it have something to do with swap prices? If so, can someone explain that a little bit further? How would I avoid that situation? I would really appreciate a prompt reply! :smiley: Thanks a lot!

When rollover happens at 5 PM EST, interest is debited or credited to your account. There isnā€™t a hedge of the same pairs that pays net positive interest to your account. It is a slow death.

You lose two spreads, and the rest is probably swap.

I have to ask, what is a slightly negative profit?
Wouldnā€™t that be a loss?

Also. I donā€™t know of a broker that will let you hedge that way. In essence you would be trading with yourself. The only way to make money would be to have the swap pay youā€¦

No brokers let you place a bet that is a reverse of another bet? Are you certain of this? It is a crucial part of the strategy to an EA that I made. Can you please elaborate on how to offset this effect? Is it possible to buy another currency pair at the same time to do it?

And yeah when I said negative profit I did just mean loss.

I donā€™t know of any brokers that allow that.

Doesnā€™t mean they arenā€™t out there though.

Liteforex lets you hedge like that, I do it all the time there are some good reasons why you would want to, at first it does appear that you are trading with yourself but consider this, you open a position which you plan to hold for some time because you want the long term trend. to do this you accept there will be some reversals but you want to ride them out.
When you can open orders in the opposite direction you can trade the reversals too while still leaving your long term order open.
Also if you have a trade run into a loss, you can open an equal and opposite order to freeze the loss untill the price action moves in favor of the first order so then you close out the hedge order, the price action could have moved 4000 pips against your first order but it doesnt matter when the loss was hedged at 50 pips, the loss order is 4000 pips negative, the hedge is 3950 in profit.

I know these guys above are being very good and trying to help you, but really the best advice is - donā€™t bother, stop wasting your time.

Not seeing the logic here.

How do you get out? Close both trades?

If Iā€™m gonna lose 50 pips, Iā€™ll just cut my losses early rather than pay another spread, tie up capital, and pay swap rates for god knows how long.

Iā€™m not sure swap even registers in the strategy tester. As for getting stopped out, I think that it just ran out of time, meaning you ran and the trade remained open until it reached your time limit and had to stop at whatever profit/loss it was at. According to the report, your ā€œFromā€ date was Jan 20, 2000 and the ā€œToā€ date was feb 10, 2003ā€¦was that what you set it to before running the tester?

To get out you close out the hedge order first when the price reaches a reversal point like a resistance level then you let the original order stay open and make profits now that the price has reversed and is moving in its favor. There are times when it can be useful to hedge, theres a time and a place for everything.

Can you please explain?.. Donā€™t bother wasting my time on what?

Ok, great, thatā€™s good to know.
To shed some light on what may be going on, my EA uses a hedge grid trading strategy that I came up with.

I take out an opposite order for a lot number equal to the original order if a trend takes the price too far in the wrong direction (ex. I go Long for 1 lot if I went Short for 1 previously). I have the TakeProfit set to the price I originally bought the losing order at.

After I place the opposite order I then continue grid hedging and hope that the price will eventually retrace back to the original losing order.

mfurlend,

I think sweetpips has it right. The strategy tester is simply running out of time and forcibly closes the order and says close at stop.

You can verify this by looking in the tester journal where you should find an entry like this if it really has been stopped out :-

2010.04.16 12:45:05 2009.12.21 01:00 Ilan1.4: stopped because of Stop Out

If you donā€™t see this then it has closed because of the end of the test.

Interesting, update 226 does not do this anymore and just leave the orders ā€œopenā€

Originally Posted by purplepatchforex
I know these guys above are being very good and trying to help you, but really the best advice is - donā€™t bother, stop wasting your time.

What purplepatch is on about here is that hedging has no value as a trading strategy. I am not quite sure about whether he should tell you not to waste your time since that is your perogative. I used to be a devout follower of the hedge grid type strategy until I saw the light. I recognize that it is a road that people need to follow in their education.

I am not sure what Master Tang means when he says that brokers will not let you hedge??? Perhaps he is referring to NFA(US) regulated brokers but most brokers will allow hedging and, in fact, use it as a selling pointā€¦they do that cos it is profitable for them, not because it is good for you.

It may be worth your while to go read up on why the NFA banned hedging, as I believe that their ideas have merit. It is the implementation and the unintended consequences that I have an issue with but the basic reasoning is sound.

And I added ā€œdoesnā€™t mean they arenā€™t out thereā€.

They quite obviously are:)

Could not agree more!

Cheers!

I believe there is a new FIFO, first in first out, rule that would now cause these offseting trades to cancel each other out. Check with your broker for details.

I do not have a live account, so I have no broker to check with. Can anyone please explain this FIFO rule?

First In First Out.

Say you have a trade negatively impacting your account, and you try to hedge it with a new trade of the same pair in the other direction.

The new trade would only serve to close your original trade, as opposed to running counter to it, with both trades remaining open

If you have a couple of open positions, and try to hedge against them with a couple more, the FIFO rule would close the trades with the new ones in order of open times.

Kinda puts a hurting on hedging oppsā€¦

But Iā€™ve only dealt with US brokersā€¦ Although that is about to change;)

Ah ok, thats good to know. Hopefully some brokers will still allow it. I wanted to add that the stop did NOT occur at simulationā€™s end-date; it occurred far prior to that.

Also, if I interrupt the simulation and stop it early; the longer I wait to do so the more money I lose. That canā€™t be because of bid/askā€¦ could it be the swap? Is it possible that metatrader does not report the swap until the trade is closed?

Silly question here.

Has one of your hedged trades ever made money in simulation?
The statement ā€œthe longer I wait, the [B]more[/B] money I loseā€, should be a bit disconcerting.

It implies you start out as a loss, and only go downhill from there.
Cut your losses of time, and head to plan B, would be my $0.02 pips worth of advice.

There are successful hedge plans, but they involve a healthy dose of research, and trading correlating pairs against each other.

Just ran some testsā€¦amazingly the tester does calculate swap on an ongoing basisā€¦even takes triple swap on a Wednesday into account.

Run this little EA to check it out :-

int start()
{
if (OrdersTotal() == 0){
   OrderSend(Symbol(),OP_BUY, 1,Ask,0,0,0,NULL,0,0,CLR_NONE);
   OrderSend(Symbol(),OP_SELL, 1,Bid,0,0,0,NULL,0,0,CLR_NONE);
   }
double Swap = MarketInfo(Symbol(),MODE_SWAPSHORT)+MarketInfo(Symbol(),MODE_SWAPLONG);
Print("Balance = " + AccountEquity());
Print("Swap = " + Swap);
}

Then check the tester journal while the test is running and you can see that each time the day changes, the balance drops by the sum of the short swap and long swap.

This is where the loss comes from and you have just discovered one of the big drawbacks of a hedge strategy.