Not all exit Alerts getting Auto-Staged despite their prices are different
Author: Sarath1
Creation Date: 6/22/2020 12:53 AM
profile picture

Sarath1

#1
As per some earlier other thread discussions on the Forum, I understand that
QUOTE:
Orders tool has de-duping logic which rejects If orders for the same Account/Symbol/Price


But In my case I observe Strategy Alerts which shows all of them which are > 1 dollar difference but only one of them could make it to "Orders tool auto-staged" and when I try to stage manually other alerts from Strategy Alerts, I see the new overrides the old but keeps on orders tool only one at a time for [ bar + 1 ]


Please find below my code which is actually leveraging popular Splits logic published on the forum and used by many.. my below code may generate for same Symbol more than 1 alert for same [bar + 1] but ensuring it is Limit order with random number to keep the Price difference...

CODE:
Please log in to see this code.




profile picture

Eugene

#2
With the continue statement which skips the processing of all SellAtLimit orders but the first one, what would you expect?
profile picture

Sarath1

#3
"continue" happens only when position size is < 820 $ but for bigger position size it will do Split and Sell which are all working perfect.

This issue is not about "SellAtLimit" not getting executed and it is all working and even we see the Alerts on the Strategy Window.
The only problem is all those Alerts are NOT getting Auto-staged on Orders tool which showing only one Alert staged per Symbol
profile picture

Eugene

#4
How is Wealth-Lab's Preferences > Trading configured, with respect to:

* Disable Portfolio Synch
* Exit Orders (Sell and Cover) should always exit the full Position currently held on a per Trade Type basis
profile picture

superticker

#5
If I'm reading this correctly (Am I?), you only want one if {block} to execute. If that's the case, a ...
CODE:
Please log in to see this code.
construct would be faster because the code would automatically exit after the first "true" if condition. The way you have it now, it's testing every single if case whether it needs to or not. And the above construct wouldn't need the continue statement. It would be even faster if you did a switch construct:
CODE:
Please log in to see this code.

A this is more self documenting so you'll know what you did a year from now.
profile picture

Sarath1

#6
@eugene I just checked WL Preferences and had both of them with Default options( disabled check-box ) of below,
>> Disable Portfolio Synch
>> Exit Orders (Sell and Cover) should always exit the full Position currently held on a per Trade Type basis

As per your comments, I tried changing Defaults by enabling(check-box) of the Disable-Portfolio-Sync which greyed-out other one and running the strategy still doesn't help and seeing only 1 order for 1 Symbol.

Note: Also I found today this problem looks only for "Staging" which happens both Auto-Staging through Strategy-runs (or) Manual-Staging from Strategy-Alerts. But this problem not happen when Manual-Placing from Strategy-Alerts which works perfect sending all of those Same-Symbol multi-orders to Fidelity directly. As of today, I still don't have entitlement "Auto-Placing" to verify but looks it will work which could also be the reason you didn't hear this complaint/Bug reported by others because those do LiveTrading Strategy-Alerts use "Auto-Placing" only.

------------------------------------


@superticker Thanks for checking and that my code is as per design like below,
CODE:
Please log in to see this code.


So my intended design is,
If Small position < 820 $ to exit-completely
Else for Big positions Split into 4 portions ( 25% each) and exit-partially either 1 portion (or) multiple portions based on the Day Price-Percentage-Dip of 1%, 2%, 3%, 4%
So, for example if Bigger Position of 4000 $ and Day Opening Price Dip is already 5% for volatile stocks, per this design it will split create 4 Sell orders for same Symbol which is working fine seen all 4 Alerts on Strategy-Alerts but the problem seen only on Orders tool as it takes only Single per Symbol if "Staged" but when I try Manually "Place" all of the 4 alerts make it to Orders tool and even go all the way to Fidelity orders
Looks to me bug on WL "Staging"
profile picture

Eugene

#7
You quote from some unnamed topic:

QUOTE:
As per some earlier other thread discussions on the Forum, I understand that
CODE:
Please log in to see this code.


Found it:

Quote window fails to send multiple orders in same stock

Post #9 there claims it's a bug and a solution coming in build 23 (available when Fidelity decides it's time to release it).

QUOTE:
I think we've got this fixed for the next build (6.9.23). Thanks for the heads up.


Amazing.
profile picture

Sarath1

#8
:-)
Thanks @eugene for clarification this issue/bug is also same that is being already take care by other tracked
https://www.wealth-lab.com/Forum/Posts/Quote-window-fails-to-send-multiple-orders-in-same-stock-40002

with fixes available in build-23 and the reason I initiated this "new Discussion thread" because other one is specific about "Quote window --> Orders" and in my case it is about "Strategy Alerts window --> Orders" but good to know from you that same bug-fixes takes care for this issue also.

Note: Sure I learnt for your easy tracking, next-time will avoid "unamed topic quote" and will point to the "Specific title" if referencing any.



profile picture

Cone

#9
QUOTE:
The only problem is all those Alerts are NOT getting Auto-staged on Orders tool which showing only one Alert staged per Symbol
It's easy to duplicate this for manual or Auto-Stage. For Stage, only the last order staged for the symbol appears in the Orders tool; the previous order(s) are "de-duped" even though they have different prices. We'll have to work on that one!

Note that it does work fine for all orders when using Auto-Place.
profile picture

Sarath1

#10
Sure & Thanks @Cone for details.

With further Live Intraday Trading tests today with 10 minute Bars/Scale , I could observe this bug is Not only the case that happens if all those Single-Symbol multiple-alerts staged by Strategy on the same time of "Bar + 1" and it also happens when I tried to distribute it across consecutive next bars like Bar + 1, Bar + 2, Bar + 3.... etc using If-else logic, and still only the recent latest overrides all the multiple older same-symbol and only single seen Staged on Orders tool end of the Intraday Trading.

Basically the above means "Staging" is broken but "Placing" works just fine..

Thanks for heads-up and we will wait for this bug-fixes.

profile picture

Eugene

#11
One should never use the bar number greater than bar+1. It's a mistake to do so.
profile picture

Sarath1

#12
@eugene I didn't use in the code like bar + 2, bar + 3 but I re-designed my code using if-else logic in the way when split happens it will execute only Single same-symbol Sell during next bar. This is what I mentioned earlier using "If-else logic" which in-turn implemented logically to distribute same-symbol Sell across the next consecutive bars and we have same findings of this bug on that scenario at the end of full Intra-day trading.
profile picture

Eugene

#13
Got it.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).