Putting take-profit partials on the order books with hedging mode

 

Let's say that I open a position which is cleanly dividable by 10, with a hedging account. Is it possible to place orders that sit on the trade server ready to be executed, in such a way, that there are 10 de-facto (or actual) take-profits at 10 different price targets, each being 1/10 of the position?

Or, is the only way to do this by opening 10 different positions at 1/10 the original intended size, each with its own take-profit being set?

The only alternative to this I see, is having the EA do a 1/10 position close upon bid or ask reaching a certain price, but, I'd rather that I add liquidity with my take-profits and have them waiting to be tapped, instead of jumping in to take liquidity when the time is right.

 

Yes, your options are ...

  • "by opening 10 different positions at 1/10 the original intended size, each with its own take-profit"
  • "having the EA do a 1/10 position close upon bid or ask reaching a certain price"
 
Fernando Carreiro #:

Yes, your options are ...

  • "by opening 10 different positions at 1/10 the original intended size, each with its own take-profit"
  • "having the EA do a 1/10 position close upon bid or ask reaching a certain price"

That's what I was afraid of! You have my thanks, and back to MetaEditor I go.

 
Max0r847: take-profits at 10 different price targets, each being 1/10 of the position?
It's more complicated than that for US broker. If you open multiple orders, they must close in the proper order. Some brokers will not permit different TPs due to FIFO requirements.

You can't just use OrderLots()/10 because that is not a multiple of LotStep, and you can't close or have remaining less than MinLot.

You also must check if you have already done it, to avoid repeated closing. Alternatives:

  • Move SL to Break Even+1 before the partial close. That way, you know that you already did it.
  • Set a flag in persistent storage (files, global variables w/flush)
  • Open two orders initially, and close one (manually or by TP.)
 
William Roeder #:
It's more complicated than that for US broker. If you open multiple orders, they must close in the proper order. Some brokers will not permit different TPs due to FIFO requirements.

You can't just use OrderLots()/10 because that is not a multiple of LotStep, and you can't close or have remaining less than MinLot.

You also must check if you have already done it, to avoid repeated closing. Alternatives:

  • Move SL to Break Even+1 before the partial close. That way, you know that you already did it.
  • Set a flag in persistent storage (files, global variables w/flush)
  • Open two orders initially, and close one (manually or by TP.)

Very very true. For my first real money tests in the US this will add just a whole new aspect of "fun." I want to find whoever came up with FIFO and give them a little first in first out if ya know what I mean.

And indeed, if I want precisely dynamic sizing for risk control, I'll have to deal with the fact that there will typically be uneven lot sizes on different pieces due to the inability to get a clean division, and that's assuming I'm even willing to size beyond 2-3 microlots at first. Which means if I want maximum risk control while still retaining the ability to do targetted pieceouts, I'll have to come up with a more dynamic mechanism to look for ways to split things up, depending on how many cleanly divided pieces can be worked with, and how big the remainder piece will be compared to the other pieces, and compared to the entire meta-position. This is a problem, because statistics would have to be built around different proportions of piece-outs. Without a consistent proportion tested, the statistics can be skewed for backtesting.

Also once again I've seen it first hand, on some brokers, adjust the TP on one piece, it alters the TP on the other as well. Absolutely horrible. This is why I suspected that before I try going overseas to an online prop firm, even though they won't have FIFO, they still are using hedging accounts and they have no intention of being flexible about that. At least by dealing with a US broker, doing real money trading in tiny lot sizes will give me an opportunity to clean up the order control of the EA before bringing it elsewhere, although perhaps a lot of that work on FIFO will be for nothing, but... it's never a bad thing to be able to churn dough here in the states even with garbage spreads ;)

I don't even understand the purpose of doing hedging accounts since I find them to be nothing but an endless headache. At least for automated trading, code can be built around it. But for manual trading, it's an absolute nightmare. With netting, it's so simple. But, they ain't gonna change for me.


Is the open 2 orders idea just a way to track states? I.e. closing 1 means certain targets were reached?