I was testing my new class library, and the Strategy generated an alert on September 11, 2018 to buy XL, which was it's last trading day. Therefore, XL was never purchased, but the Alert continues to be displayed in the Alerts tab.
I can remove the alert for XL (and any other stale alerts) from Alerts at the end of the Strategy:
CODE:
Please log in to see this code.
but the alert still displays in the Alerts tab.
Is there any way to prevent stale alerts from being displayed in the Alerts tab?
Size:
Color:
Size:
Color:
QUOTE:
close out the symbol XL
Obviously, it isn't practical to hard code in all the symbols that are going to generate an alert (and what kind of alert) on the last trading day. Therefore, I'd like to be able to close them out from the Alerts object. However, this isn't stopping the stale alerts from being displayed in the Alerts tab:
CODE:
Please log in to see this code.
Is there something I'm missing here?
QUOTE:
or not open the trade
Actually, the problem is the trade is never opened. The alert is generate on Bars.Count - 1 to buy (or sell) on Bars.Count.
Moreover, it can't be known in advance whether Bars.Count - 1 is the last day the stock will trade.
Size:
Color:
QUOTE:
However, this isn't stopping the stale alerts from being displayed in the Alerts tab:
And it shouldn't: an Alert cannot be removed from the Visualizer (too late). If that matters to you, the idea is to hard code such symbols so that no trade is generated.
Size:
Color:
QUOTE:
an Alert cannot be removed from the Visualizer
Can a custom Visualizer be programmed to only display alerts if the alert.AlertDate is after some date? Before I try to recode it, I thought I'd find out if it is even possible.
Size:
Color:
Certainly you can do it in a custom Visualizer. It's completely up to you what to display in a ListView there.
Size:
Color:
Eugene
So, there is no way to clear out old Alerts ? I have literally thousands of them ....
Size:
Color:
When asking questions, especially in somebody else's topics (well formulated), it would be beneficial to provide enough details. There's no need to hesitate if questions seem more verbose than usual. In particular, knowing this might be helpful:
1. What "old Alerts" are? Why do you have so many of them?
2. Wealth-Lab tool in use (Strategy Window, Strategy Monitor)?
3. Which steps have been taken to alleviate your problem?
Size:
Color:
For 1, I have these strategies doing bar+1 to generate buy/sell alerts and they went all the way back to 2018 or 2012
For 2, strategy monitor was used to generate them
For 3, after a while, I just write them to a flat file but recently, I want to use the alert and order window again so I am trying to clean up my old trades in papertradingaccount1 and my alerts... for papertradingaccount1, I realized that I can just delete the account and recreate it and all the old positions are gone...
Oh, I scan the entire universe and generate a least 100 alerts so I can go through them manually in the morning.
Size:
Color:
Unfortunately, there is no way to clear out the Alerts view of the Strategy Monitor (if you mean that).
Size:
Color:
uninstall/reinstall ?? if someone has been using it for many years... wouldn't that be strange to see all prior alerts ??
Size:
Color:
This is by design: the SM has always kept old Alerts. When this behavior had been changed in a first 6.4 build (old Alerts to be purged), the opposite views (sometimes expressed emotionally) made the development team change their mind and revert the change. But from a programmer's point of view, deleting outdated Alerts as volatile content is
the correct behavior. Alas, the majority of SM users had a different opinion. Also, having
too many Alerts (like dozens of thousands) will most likely cause delays in SM (or even hang it) which may corrupt its configuration file.
To get rid of prior Alerts without deleting all Strategy entries, simply rerun your Strategy. It purges old Alerts and creates new ones. What can be simpler??
Re: uninstall. You signed up on our website some 18 years ago. This gives quite enough time to stumble upon this FAQ, now 11 year old:
I have a problem. Tried to reinstall Wealth-Lab, but it didn't help! ;)
Size:
Color: