Hi,
I'd like a way to interactively alert the user of certain events in the strategy, beyond printing to debug. I'm very new to .NET, and don't know the best way of going about this.
Looking at a sample, I saw System.Windows.Forms.MessageBox.Show(). This gives me the result I want... but it's non-modal, and during back-testing, execution froze until I clicked "okay" to clear the window.
If I have multiple strategies in the strategy monitor and MessageBox.Show() is called, will that also freeze other strategies? Is there a better, simple one-line call for this kind of an alert message?
Much thanks.
Size:
Color:
Size:
Color:
Eugene,
Search is where I headed first, but isn't working for me. It shows it as "under maintenance". Appreciate the links!
Size:
Color:
The following code will create a non-modal window but then will leave the window visible when the script finishes (using the ShowDialog() method). If you remove that the window will vanish when the script completes and the AppDomain is removed from memory. Just curious why you wouldn't want to use the printdebug method though?
Dave
CODE:
Please log in to see this code.
Size:
Color:
Dave,
I'm looking for some way to send myself *actual* alerts from the script as it runs in the Strategy Monitor, not just while back-testing. While back-testing, the debug window is fine/great.
Do you know if your suggestion will work from the Strategy Monitor..? And/or, is there something I'm missing, in terms of a really easy mechanisms to send information out of active strategies running in the Monitor?
Size:
Color:
QUOTE:
And/or, is there something I'm missing, in terms of a really easy mechanisms to send information out of active strategies running in the Monitor?
You could, for instance,
e-mail it.
Size:
Color:
Another option is using Win32 messages. You'd need to use PInvoke to call them but you could call FindWindow to get the window handle of a notepad instance (or a WL window for that matter), then send text to the window. You could also use email as Eugene suggested, or also write to a database and poll the DB for changes (or if it's sql 2005 you can have the database itself notify you via a callback).
Dave
Size:
Color:
Oh Eugene, that's too cool. Thank you.
How about AlertBySMS? :)
Size:
Color:
Nice tools at that link. CommentaryWindow should also do the trick, yes?
Is there a way to link in this code to my strategy with its existing namespace, or should I just copy/paste code into that single file?
Pardon all the silly questions, my universe of knowledge of Wealth-Lab is less than 48 hours old. :)
Size:
Color:
QUOTE:
Is there a way to link in this code to my strategy with its existing namespace, or should I just copy/paste code into that single file?
In the future, when we have enough stuff to compile the Community.Components.dll with that procedure, you'll need to drop that assembly in Wealth-Lab's main directory, reference it in every Strategy, and then call the procedure. Meanwhile it's possible to insert the procedure into a Strategy manually.
Size:
Color:
Size:
Color:
Eugene,
I have been researching sending SMS to my mobile phone from within my strategy code. I found this article but it is more than 2 years old. Could you please update me on the latest, how can I send sms to my cell phone? I did not find any extensions for this purpose.
-Best J
Size:
Color:
Ask your operator about the phone's email address.
Then either simply configure your mailbox in Wealth-Lab's Preferences > Email Settings to receive Alerts or use the AlertByEmail function which description can be found in the Wiki.
Size:
Color:
Eugene,
Thanks. Is the procedure to send emails is the same as SMS? I am concerned with sending SMS (text messages) to my phone, not emails.
-Regards, J
Size:
Color:
If your operator provides an email to SMS gateway, the email sent will be SMSed to your phone.
Check out the Wikipedia link above, it's all explained there.
Size:
Color:
Eugene, I think I understand now, thanks :-)
Size:
Color: