- ago
I have two block strategies the both trade TQQQ. One of them (WealthLab-Turnaround Tuesday) triggered yesterday and was filled this morning with 622 shares. Today after the close, both strategies had a sell signal triggered. At first both generated a sell order, one with 126 shares and another with 128 shares. After noticed that I canceled them. After reading the trading instructions in help, I enabled some options in the trading preference (attached in the screenshot). Then I rerun both strategies and now both strategies triggered a sell and both summitted an order with 622 shares.

Since the 622 shares were from one of the strategies, how do I prevent the other strategy submit a sell order to sell the same position?

0
102
Solved
8 Replies

Reply

Bookmark

Sort
Glitch8
 ( 12.97% )
- ago
#1
You’d want to turn off the option to always set the exit order quantity to the size of your broker position.
0
- ago
#2
Thanks Glitch. I check that option after I saw the 128 share and 126 shares sell orders. Any idea how could that happen and how to resolve that?
0
Cone8
 ( 6.69% )
- ago
#3
First, let's get the correct sequence of events. Information is missing. You said you got 1 signal for 622 shares and then 2 strategies generated orders to sell 126 and 128 shares. If one of those strategies bought 622 shares, you changed a setting before the sell signals.

To answer the question, if you have 2 strategies running that can exit the same position at exactly the same time, you can't prevent that with Auto-Trade. The only thing you can do it to make sure each one exits the same number of shares it entered by disabling the option Glitch mentioned.

You can also leave that option enabled, but just make sure there logic (like time of day) to prevent both strategy submitting the exit at the same time. The "Block Exit Orders" option will prevent selling (i.e., shorting) a position you don't own.
0
Best Answer
- ago
#4
Here is the sequence:
1. One strategy had a buy signal and bought 622 shares MOO
2. After market close that day, two strategies triggered sell signals on the same ticker, two sell orders were issued with 126 and 128 shares.
3. I noticed the shares does not match so I canceled the orders. Then updated the trading preference to the one I showed in the screenshot.
4. I used "Run" Now to rerun both strategies and two sell orders were issued, both with 622 shares. Maybe here I should have reran just for the strategy that bought the shares. The reason i reran both was that I though WL would check the transactions on IB and match strategy orders, transactions and positions (e.g. based on orderRef) so that only the strategy that bought the share issue a sell order.

0
Glitch8
 ( 12.97% )
- ago
#5
No, WL8 can't match strategy orders with IB or any other broker.

The only thing brokers report back to us is a single position for each symbol.

So you'll need to take some care manually when working with multiple strategies that trade the same symbols, and keep them in check.
0
- ago
#6
@glitch I see. Thanks.
How can I get historical orders from a strategy to a broker? Basically those orders that go in/out of the order manager. My computer restarted today and after I restarted WL I do not see anything in order manager that were there before restart. The orders are submitted to the broker already. I'm thinking of maintaining a historical view of all orders so I could review/debug.

Added later:
I searched the forum seems there's no such support right now. Added a Feature request https://www.wealth-lab.com/Discussion/Feature-Request-Automatically-save-Order-Manager-history-12155.
0
Cone8
 ( 6.69% )
- ago
#7
You should restart WealthLab (and probably Windows) every day to refresh broker connections. Brokers require refreshes and although we try to maintain a connection after a break, it's best to restart once each day.

QUOTE:
Basically those orders that go in/out of the order manager.
Uncheck these boxes. Then you can right click, copy and paste the order history before that restart.

0
- ago
#8
@Cone
Thanks. Today it was an unexpected restart (blue screen)...
0

Reply

Bookmark

Sort