Choosing between system signals

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
CyTrend
Roundtable Fellow
Roundtable Fellow
Posts: 57
Joined: Mon Oct 25, 2010 5:28 pm

Choosing between system signals

Post by CyTrend »

Hello is there an easy way to have too systems running and basically you take the signal from whichever system gives it first and then ignore the signal from the other system?
So System1 and system 2. on 5th of march i buy with system 2 and I stay long till 5th april then I ignore all buy signals from system 1, does that make sense?

tx,
Cy
LeviF
Roundtable Knight
Roundtable Knight
Posts: 1436
Joined: Mon Dec 22, 2003 12:24 pm
Location: Des Moines, IA
Contact:

Post by LeviF »

Something along the lines of this in the Can Add Unit script should do the trick.

Code: Select all

FOR index = 1 to test.systemCount STEP 1
tempinst.loadSymbol(instrument.symbol , index)
if tempinst.position <> out then order.reject
NEXT
sluggo
Roundtable Knight
Roundtable Knight
Posts: 2987
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo »

Part of the difficulty is when one or more of the systems trade with price orders (stop orders and/or limit orders).

Suppose that system #2 issues a sell stop order (to enter a short), and system #5 issues a buy limit order (to enter a long), for the same day. Maybe the price that day doesn't touch either order; maybe it touches one order but not the other; maybe the price touches both orders. You don't know which will happen (and you don't know which will happen first). So you issue all orders and pray that you get either zero fills, or one fill. If you get more than one fill then you've got a problem and you need to take corrective action.

Even when all systems trade using market orders only, you still have to deal with the situation where several of them want to trade on the same day. You need to invent a "tie breaker" procedure. LeviF's tie breaker simply issues whichever order Blox processes first, which you may or may not find acceptable.

All of this would need to be written into trading system code. I don't think it would be easy.
Post Reply