hey guys,
the condition list in WL5 for Date/Time only includes conditions for dates.
I'm trying to create a script that buys the high-of-day or shorts the low-of-day only AFTER A certain time of the day (say 10 or 11am), with a trailing stop loss, and always closes out the trade at close of market.
any ideas/help would be apprecaited!
thanks
Size:
Color:
You will need to use a code-based Strategy to do that. Use the Hour/Minute properties of the standard .NET DateTime object. Here's a wrapper function that makes coding a little more straightforward:
Time based strategiesI'll stress this in the WL5 Wiki FAQ.
Size:
Color:
hi eugene.
thanks for the help and pointing me to that link. the code looks simple enough.
would you suggest learning WL4 syntax and using the converter code , or just to just straight into C#?
i only ask because the WL4 community still seems very large comapred to WL5.. hopefully people will switch over soon ;)
cheers!
Size:
Color:
hey one more thing. i cant seem to find a pdf for documentation on C# / WL5 syntax?
I just see Wealth Script 4 documentation under the 'products' tab. Am i missing something ;)
cheers!
Size:
Color:
QUOTE:
would you suggest learning WL4 syntax and using the converter code , or just to just straight into C#?
I'd strongly suggest starting with C# syntax to save the learning curve.
QUOTE:
i cant seem to find a pdf for documentation on C# / WL5 syntax?
To be precise, "WL5 syntax" equals "C# syntax". You'll find the V5 WealthScript methods and properties documented in the QuickRef, along with many examples. There's no PDF version, as well as no plans to create one. The QuickRef tool is designed to serve as a handy online reference that comes with sample code ready to run.
Size:
Color: