Time based strategies
Author: maustin30062
Creation Date: 8/24/2008 8:41 PM
profile picture

maustin30062

#1
First, I want to congratulate you on WL 5.1. I think having a single integrated platform will be a big boon to speed and stability, especially with automated trading. I think people are overestimating the amount of C# that they need to learn as I don't see the need (as a non-C# programmer) to learn all of C# to do the limited applications required for most scripting.

I would appreciate a small primer on using time based strategies in C#. Specifically, I use a strategy that buys stocks only in the time period between 9:55 am and 13:00. I have used the gettime(bar) function in WL 4, but would like to learn how to get similar results in WL 5.1. It looks like the time must be extracted from the date function to me. I think that time based criteria would be a good thing to add to the strategy builder, which now only has date and day criteria in the date/time section.

Thanks,

Marty
profile picture

Eugene

#2
You can continue to use GetTime in WL5. ;) Here's the function:
CODE:
Please log in to see this code.

And an example:
CODE:
Please log in to see this code.


Think .NET for Math Functions.
profile picture

maustin30062

#3
Thanks. I'll paste that into my strategies, so that I can use the old familiar syntax.

Marty
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).