Feature Request for Futures Trading

 

Hi, I am trading futures on a netted broker.  I have multiple EAs that trade the same instrument. 

I'd like a feature where the EAs can still control their specific lots in that grouped netted order.  So there can be multiple TP/SL running at the same time. 

Currently   Their orders get grouped together into one order, and only one TP/SL is on that order. 

What is happening, in a trending market, is that orders get stacked upon each other and the first TPs on the first orders do not get hit.

Please consider this feature!  What does the community think about this?

I'd also like a way to set priority on direction for a symbol as well.  If I have both a long and short strategy running, I can give priority to one direction.  

If I prioritize long, then long orders replace short orders and if a long order is currently on, then a short order is ignored.

If there is another place to submit this request please help me, 

Thanks!

 
ZS444:
I am trading futures on a netted broker... I'd like a feature where the EAs can still control their specific lots in that grouped netted order... 

What you describe happening is an effect of the FIFO rules of the U.S. CFTC and NFA.

The only "slanted" way around FIFO regarding CME Futures is to code your EA to trade both the front-month contract and the next-month contract (front-month and next-month refer to contract expiration dates─not contiguous actual months). In this way, you would be relying on the two contracts to trade similarly which is usually, but not always, the case.

ZS444:
I'd also like a way to set priority on direction for a symbol as well...

That strikes me as a rather strange order management "feature" to demand from a trading platform. Presumably, you have some analytical conditions that determine directional priority. I suggest that you code them into your EA's. (Hint: Multiple EA's can easily communicate with each other via terminal-wide MQL5 GlobalVariables).

Alternatively, you could use a shared magic number, and each symbol code, respectively, among the EA's but that is a bit more complex.
 
Ryan L Johnson #:

What you describe happening is an effect of the FIFO rules of the U.S. CFTC and NFA.

The only "slanted" way around FIFO regarding CME Futures is to code your EA to trade both the front-month contract and the next-month contract (front-month and next-month refer to contract expiration dates─not contiguous actual months). In this way, you would be relying on the two contracts to trade similarly which is usually, but not always, the case.

That strikes me as a rather strange order management "feature" to demand from a trading platform. Presumably, you have some analytical conditions that determine directional priority. I suggest that you code them into your EA's. (Hint: Multiple EA's can easily communicate with each other via terminal-wide MQL5 GlobalVariables).

Good practical suggestion buried in an incorrect regulatory explanation. The real culprit is MT5 's netting architecture , not FIFO. 
 
Victor Paul Hamilton #:
[I]ncorrect regulatory explanation. The real culprit is MT5 's netting architecture , not FIFO. 

You need to study up on laws and regulations on this side of the pond.

The OP posted that:

ZS444:
[O]rders get grouped together into one order...

That is the epitome of FIFO regulation where the first trade that you enter must be closed first, the second must be closed second, and so on. Therefore, MT5 is complies with the FIFO rule by averaging all trades into one conglomerate trade.

Having said that, there is an exception where each of the trades are different contract sizes─which is the part of the regulation that MT5 does not support. In any event, the OP did not mention different size trades. Therefore, the exception is irrelevant to this thread.


Edit: As yet another workaround, the OP could probably code an EA to send a market order, opposing the entry direction and set at half of the aggregate position size, when price reaches the desired exit distance. In this way, the automatic offsetting of a Netting account will simply close half of the aggregate position. Of course, this would be a client-side implementation─not server-side.
 

Here is a summary of the applicable regulation:

Rule 2-43b was implemented by the U.S. forex (FX) industry's self-regulatory organization, the National Futures Association (NFA). It's known as the "FIFO rule" and, essentially, eliminates hedging. Hedging in forex trading is where a trader will have both a long and a short position in a single currency pair at the same time, offsetting each other.

Rule 2-43b prohibits the dealers from allowing this practice by requiring that multiple positions held in the same currency pair be offset on a first-in, first-out (FIFO) basis. It also bans price adjustments to executed customer orders, except to resolve a complaint that is in the customer's favor. The rule also limits changes to certain straight-through processing transactions. These changes must be reviewed, approved, and documented by the NFA.​​​​​​​

The National Futures Association (NFA) implemented the rule in 2009. It applies to all brokers and traders who fall under the NFAs jurisdiction. The NFA is a self-regulating organization, and mandatory membership is critical to allowing the organization to enforce its rules and policies. Its membership requirement applies to virtually all registered forex professionals working in roles which include all registered:

  • Futures Commission Merchants (FCM)
  • Retail Foreign Exchange Dealers (RFED)
  • Introducing Brokers (IB)
  • Swap Dealers (SD)
  • Major Swap Participants (MSP)
  • Commodity Pool Operators (CPO)
  • Commodity Trading Advisors (CTA) who direct client accounts or provide tailored investment advice...

Traders refer to 2-43b as the FIFO rule. This first-in, first-out policy means that traders must close the earliest trades first in situations where several open trades-in-play involve the same currency pairs and are of the same position size.
(https://www.investopedia.com/terms/n/nfa-compliance-rule-2-43b.asp).

Of course, it would be nice if for all traders in FIFO jurisdictions if Metaquotes developers could figure out how to implement the exception.

 
Ryan L Johnson #:

You need to study up on laws and regulations on this side of the pond.

The OP posted that:

That is the epitome of FIFO regulation where the first trade that you enter must be closed first, the second must be closed second, and so on. Therefore, MT5 is complies with the FIFO rule by averaging all trades into one conglomerate trade.

Having said that, there is an exception where each of the trades are different contract sizes─which is the part of the regulation that MT5 does not support. In any event, the OP did not mention different size trades. Therefore, the exception is irrelevant to this thread.


Edit: As yet another workaround, the OP could probably code an EA to send a market order, opposing the entry direction and set at half of the aggregate position size, when price reaches the desired exit distance. In this way, the automatic offsetting of a Netting account will simply close half of the aggregate position. Of course, this would be a client-side implementation─not server-side.

I'm asking for us to consider a feature to allow the first entry's exits of TP/SL be honored.  


Currently the second order that joins in takes over the TP/SL.


What happens is the edge of the first strategy is no longer valid because it has a different TP/SL based on a different entry point.


I'll look into the communication option, thanks.

 
ZS444 #:
I'm asking for us to consider a feature to allow the first entry's exits of TP/SL be honored.

To get further down into the weeds regarding FIFO, it is legal to have independent stops if the underlying positions are of difference contract sizes. Unfortunately, Metaquotes developers can't figure out how to implement multiple positions in a Netting account in MT5 in a way that is compliant with the CFTC and NFA rules (and likely a myriad of other unique regulations in other jurisdictions─all in one type of account, Netting). Therefore, you can never really get to the point of different contract sizes. There is however, one FX broker-dealer in the U.S. that offers that feature in MT4 only. Of course, that is of no help for CME Futures trading.

"As yet another workaround, the OP could probably code an EA to send a market order, opposing the entry direction and set at half of the aggregate position size, when price reaches the desired exit distance. In this way, the automatic offsetting of a Netting account will simply close half of the aggregate position. Of course, this would be a client-side implementation─not server-side." (Post #4).

ZS444 #:
I'll look into the communication option, thanks.

You're welcome.

 
Ryan L Johnson #:

Here is a summary of the applicable regulation:

Rule 2-43b was implemented by the U.S. forex (FX) industry's self-regulatory organization, the National Futures Association (NFA). It's known as the "FIFO rule" and, essentially, eliminates hedging. Hedging in forex trading is where a trader will have both a long and a short position in a single currency pair at the same time, offsetting each other.

Rule 2-43b prohibits the dealers from allowing this practice by requiring that multiple positions held in the same currency pair be offset on a first-in, first-out (FIFO) basis. It also bans price adjustments to executed customer orders, except to resolve a complaint that is in the customer's favor. The rule also limits changes to certain straight-through processing transactions. These changes must be reviewed, approved, and documented by the NFA.​​​​​​​

The National Futures Association (NFA) implemented the rule in 2009. It applies to all brokers and traders who fall under the NFAs jurisdiction. The NFA is a self-regulating organization, and mandatory membership is critical to allowing the organization to enforce its rules and policies. Its membership requirement applies to virtually all registered forex professionals working in roles which include all registered:

  • Futures Commission Merchants (FCM)
  • Retail Foreign Exchange Dealers (RFED)
  • Introducing Brokers (IB)
  • Swap Dealers (SD)
  • Major Swap Participants (MSP)
  • Commodity Pool Operators (CPO)
  • Commodity Trading Advisors (CTA) who direct client accounts or provide tailored investment advice...

Traders refer to 2-43b as the FIFO rule. This first-in, first-out policy means that traders must close the earliest trades first in situations where several open trades-in-play involve the same currency pairs and are of the same position size.
(https://www.investopedia.com/terms/n/nfa-compliance-rule-2-43b.asp).

Of course, it would be nice if for all traders in FIFO jurisdictions if Metaquotes developers could figure out how to implement the exception.

Solid mixed bag here ,genuinely useful workaround at the end, but the regulatory scaffolding underneath it still doesn't hold. Rule 2.43 is titled 'Forex Orders' for a reason and NFA's own guidance excludes non-forex counterparties, so an FCM's general NFA membership doesn't pull futures trading under it. Anyways as always , Adieu !.