"Sell" Alerts for Positions not currently owned
Author: jeffjs2003
Creation Date: 9/28/2017 7:09 PM
profile picture


When I run my strategies in real-time trading I get "sell" alerts for positions that I don't currently own. Presumably these are generated from previously held positions leftover from actual (or simulated) strategy runs. Is there a way to deactivate old (non-active) "bought" flags so I won't get extraneous "sell" alerts?
profile picture


The first thing to point out is that scripts always run in a hypothetical mode - there is no attempt to sync with live Positions. However, if a corresponding Position to exit does not exist and you have not checked Preferences > Trading > Disable Portfolio Synch, those Alerts will not be Auto-Staged or Placed to the Orders tool. Even if you do disable P.Synch, such an order sent to the Fidelity backend would simply error out.

For more information, see the User Guide: Orders > Portfolio Synch
profile picture


Sorry, I should have been more clear. I realize the runs are hypothetical. My point being that the "sell" alert signals seemed to be generated from "buy" signals from previous strategy runs (which I may or may not have purchased) and not associated with my recent real-time runs during the trading session. This is the reason I characterized those signals as "extraneous". For example, while running the strategies today in real-time a "sell" signal appeared in "Alerts" (wasn't auto-staged, as you stated) even though that position wasn't recently hypothetically bought during real-time trading runs. My assumption is that those "sell" signals were generated as a result of previous back-testing and/or from real-time run(s) a couple of years ago when I last used WLP. Is it expected to get "sell" alerts during real-time runs based on previous back-tested "buys"? If so, is there an easy way to prevent these extraneous alerts?
profile picture


I don't use real-time WL trading; my simulations are only for daily bars. But I have struggled with the same problem of getting alerts for stocks I don't actually own in my portfolio. I do believe the WL simulation (backtest) should remain hypothetical so I have a clear picture of how the simulation architecture is working. However, Alerts are different. They should be about one's actual trading and portfolio, and not about what might have happened in the past within a hypothetical simulation.

In truth, I don't buy every stock the WL simulation buys (My simulation design isn't that perfect.), so there are always stocks owned by the simulation that I don't currently own in my portfolio. What I would like to see are (1) Buy Alerts about stocks I don't currently own (even when the simulation already owns them) but the simulation thinks there's an immediate buy opportunity for me to own, and to (2) omit Sell Alerts for stocks I don't own at all. I've coded a work around for case# 1 (which is awkward), but not for case# 2. Perhaps WL can be enhanced to support both cases.