- ago
I have a strategy that places a short limit order on SQQQ when price is 1% above the upper Bollinger Band e.g (21, 2).

I’d like to test an alternative behavior: instead of shorting SQQQ, take a long position in TQQQ when that same SQQQ condition is met (i.e., when the SQQQ order would have been filled).

Conceptually, this treats the SQQQ signal as a trigger rather than an actual trade on SQQQ itself.

Is there a way to do this kind of cross-symbol conditional trigger and execution?
0
40
3 Replies

Reply

Bookmark

Sort
- ago
#1
I think about it and realized this is impossible, unless detailed intraday data is available, since one needs to know the price of TQQQ when SQQQ price hits the limit price.
0
- ago
#2
QUOTE:
I ... realized this is impossible,...

Well, it's impossible if you're trying to do it the same way a "conditional trade" would execute on the exchange itself.

But you can do it by letting the trigger occur on the last Chart bar so WL can provide a "signal" on the following off-the-Chart bar. But that's not the way a conditional trade works on the exchange. That works on the same bar (i.e. immediately), not the following bar.

I suppose you could use an intraday strategy so the following bar that receives the signal wouldn't be too far away (relative to time) and would occur on the same trading day. Is that acceptable?
0
Glitch8
 ( 10.71% )
- ago
#3
Yeah, if it’s a daily strategy you could absolutely code this up and pull in intraday data to get a good approximation. You could ultimately use OrderType.FixedPrice for your TQQQ order once you have the fill price.
0

Reply

Bookmark

Sort