Reply

Multi Strategies on the same symbol and the same time frame for futures trading

9 replies

Jim Lin

Subscriber, bbp_participant, customer, community, 10 replies.

Visit profile

4 months ago #269638

Hi, Friends

Due to futures’ FIFO regulation, even I separate two account for logn and short strategies on MT5 plateform, however the magic numbers are still not working, and then the next order will cover all stoploss/ take profit to previous trades.

Is anybody knows how to manage multi-strategies on any platform?

Please share, thank you.

I heard that there is an App to collect all strategy signals from Multi-chart and place order to brokers, no idea of the name of the App.

If anybody knows please advise me.

And if there is any solution on Tradesation or other platform, please also share.

Thanks in advance.

 

0

tomas262

Administrator, sq-ultimate, 684 replies.

Visit profile

4 months ago #269676

Hello,

the only way to trade the same market using multiple strategies is to create multiple (sub)accounts. But be aware there is a rule that prohibits doing that

https://www.cmegroup.com/tools-information/lookups/advisories/market-regulation/CMEGroup_RA1308-5.html

https://www.law.cornell.edu/cfr/text/17/1.46

0

mabi

Customer, bbp_participant, community, 262 replies.

Visit profile

4 months ago #269684

There is a German broker were you can trade futures without FIFO rules called FXFLAT.

0

kainc301

Customer, bbp_participant, community, 54 replies.

Visit profile

4 months ago #269686

Hello. I have also been dealing with this issue. Because I cannot have separate accounts, I have to combine the long and short side together in Algo wizard. in MultiCharts, I believe FIFO is handled in the Multicharts engine. However if you’re trying to use MT4 or MT5, you have to essentially make edits to the code to make sure that the long side does not trigger when there is an open sell order and vice versa. The final output should also say something like if(longCondition && !shorCondition) for long and vice versa for a short to make sure that both conditions are not true when the trade is entered. This output is in the MC output as well, I am not sure about MT4 or MT5 output yet.

Ultimately there is a cost to this. Operating two separate accounts would probably yield more profits as the long side can profit while the short side is losing and vice versa. When you combine your long and short algorithms, you will have to compromise your profitability significantly as they can no longer operate independently and need to rely on the other to have not triggered an order in order to trade. It sucks but there’s no other way around it when it comes to FIFO.

0

jpcoder

Customer, bbp_participant, community, 29 replies.

Visit profile

3 months ago #270279

Since it looks like you can not run multiple strategies  simultaneously (like a merged portfolio), at least on MT5 netting mode, without one strategy just reusing any existing open position, does this mean that you really can only run one strategy at a time per futures instrument?  I’ve backtested a merged portfolio of several strategies in MT5 and it backtests well, but the trades it produces are very different from the SQX or QuantAnalyzer results because they do not seem to take into account the netting of the positions.  There any solution for this or do you just have to run one strategy at a time?

0

jpcoder

Customer, bbp_participant, community, 29 replies.

Visit profile

3 months ago #270282

Another thought on this.  As an enhancement, would it be possible to allow SQX to create merged portfolios that would allow multiple strategies to place pending orders on the same instrument but as soon as one is filled it cancels all other pending orders?  That way you could have multiple strategies looking for opportunities at once but only one strategy would be running when there is an active position.  As soon as the active position is closed then the multiple strategies could again start placing pending orders.

0

OnTheEdge_

Subscriber, bbp_participant, customer, community, 11 replies.

Visit profile

2 months ago #271347

You would have to have 2 accounts with Different Logins. So you have to divide your money in half. You need to talk to your broker about this. I know of 1 broker in the US who offers MT5 for futures in their client section there is an option to create a Sub-account, I’m not sure if this will work or not.

I found this explanation on Interactive Brokers website;

Can I be long and short the same underlying contract simultaneously?
Overview:
IB does not offer this particular account structure.  While IB does offer stock and option trading in the same account as futures/commodities trading, there is no account structure here where traders can be short and long the same underlying contract simultaneously.
Background:
This could occur if an account holder had more than one account.  For example, this account holder could short an XYZ June 2009 45 call in account UXXXXX1, and go long the same XYZ June 2009 45 call in account UXXXXX2.  However, if the account is short 1 XYZ June 2009 45 call in account UXXXXX1, and buys one June 2009 45 call in account UXXXXX1, this would close the short position.

 

With that said the options are to create a basket of Long only and Short only Strategies and run them on separate accounts.

As an enhancement, would it be possible to allow SQX to create merged portfolios that would allow multiple strategies to place pending orders on the same instrument but as soon as one is filled it cancels all other pending orders?  That way you could have multiple strategies looking for opportunities at once but only one strategy would be running when there is an active position.  As soon as the active position is closed then the multiple strategies could again start placing pending orders.

You can have multiple strategies opening multiple positions in the same direction, yes MT5 will group the trades but it is possible that the Trades close at different PT/SL. However the issue does arise when the strategy managing (lets say we have 4 strategies and 4 positions open) our open position #3 needs to close, FIFO Position 1& 2 would have to close first.

IMHO, this renders Baskets practically worthless in the US or anywhere FIFO is enforced. Unless, you try to build strategies based on specific time slots, days, similar instruments etc. OR setting up multiple accounts.

Maybe one day traders will rise up and petition to have the FIFO (Fools In Freaking Office) to repel FIFO.   🙂

0

jpcoder

Customer, bbp_participant, community, 29 replies.

Visit profile

2 months ago #271348

You can have multiple strategies opening multiple positions in the same direction, yes MT5 will group the trades but it is possible that the Trades close at different PT/SL. However the issue does arise when the strategy managing (lets say we have 4 strategies and 4 positions open) our open position #3 needs to close, FIFO Position 1& 2 would have to close first.

This is not what I experienced when testing with AMP Futures and MT5.  When two pending positions in the same direction were filled they seemed to combine into one position referencing the last strategy that was filled.  It didn’t look like they could be closed separately or had different PT/SL.

I did modify the merged portfolio MT5 code so that it would close all pending orders when ones of the pending orders was triggered.  This allows for multiple strategies to place bets but only one to run after a pending order is triggered.  This seem to back test really well on MT5/AMP Futures and I have it running on a demo account now to see how it does in the future.

0

hankeys

Customer, bbp_participant, community, 480 replies.

Visit profile

2 months ago #271349

truth is that we know exactly how netted account works – problem is that we cant simulate the portfolio in SQX

You want to be a profitable algotrader? We started using StrateQuant software in early 2016. For now we have a very big knowhow for building EAs for every possible types of markets. We share this knowhow, apps, tools and also all final strategies with real traders. If you want to join us, fill in the FORM. 1500+ final SQX strategies for members running on demo accounts to verify the edge DEMO ACCS. We provide also strategies for indices - DAX, DOW JONES, NASDAQ, SP, UK, because we have realtick data from our brokers.

0

OnTheEdge_

Subscriber, bbp_participant, customer, community, 11 replies.

Visit profile

2 months ago #271364

<p style=”text-align: center;”>

You can have multiple strategies opening multiple positions in the same direction, yes MT5 will group the trades but it is possible that the Trades close at different PT/SL. However the issue does arise when the strategy managing (lets say we have 4 strategies and 4 positions open) our open position #3 needs to close, FIFO Position 1& 2 would have to close first.

<p style=”text-align: center;”>This is not what I experienced when testing with AMP Futures and MT5. When two pending positions in the same direction were filled they seemed to combine into one position referencing the last strategy that was filled. It didn’t look like they could be closed separately or had different PT/SL.

Its my experience/understand that yes it looks like MT5 groups the trades, however the orders and the respected order numbers are still separate. So it is possible to close a portion of the trade (strategy that entered the market first) at one price and then the 2nd entry at a different target.

You can try this on a demo by manually placing a trade and then another. MT5 will show you the sum profit/lose for the total position but if you close out an equal portion of the trade as the first position taken you’ll you the P&L reflects the 2nd position.

Since each order has a unique number it should be possible to add some code to the strategy that always closes an amount equal to the 1st position opened and carries on closing in order of trade opening.

Or the code could be written to Sell an equal amount as opposed to closing the position.

I was going to explain why maybe another time

I don’t have the code to do that nor I’m I sure how SQ would/could handle that during strat & portfolio  creation.

problem is that we cant simulate the portfolio in SQX

Which is why I said IMHO portfolios are unless in FIFO accounts. You’ll never really know when a strategy in a portfolio is failing.

0

Viewing 10 posts - 1 through 10 (of 10 total)