In v4 I used this function to identify the Hexensabbat (the 3rd friday in March, June, September and December).
How can this be done in v5
CODE:
Please log in to see this code.
Size:
Color:
I deliberately will not present a ready method so that you can have a chance to learn about dates in .NET straight from horse's mouth (i.e. MSDN) - everybody have to use these methods from time to time:
1 - Our
Wiki FAQ tells where did the Date/Time functions go.
2 - OptionExpiryDate is now called
IsOptionExpiryDate - please look that up in the QuickRef.
If you have any problems with your implementation, let us know and we'll help.
Size:
Color:
If I understand it correct then, there is no way of not working with an IDE?
Size:
Color:
I didn't mean to tell that. Just the opposite, the function would most likely take the same 2 or maybe 3 lines of code.
The key is: GetMonth = Bars.Date[bar].Month
Size:
Color:
Okay, thats it:
CODE:
Please log in to see this code.
This code is derived from a translation.
Two learning questions:
Why do I get an error if I try to change the class name?
What is namespace and why does it throw an error if I change that?
Why do I get an error, when I remoce "using financtic.TL", there are no more methods used from it.
Size:
Color:
Good try.
finantic.WL is a namespace coming from WealthScript Translator. Hence the errors.
Insert your public bool Hexensabbat in any native Strategy (they're derived from WealthScript, not WealthScriptTL as the ones created by the WSTL tool) - in the same place as you did - and it will work fine.
Size:
Color:
Hmm, I think I dont understand what a namespace is and why the
class Strategy : WealthScriptTL cannot be named Strategy: Hexensabbat.
Size:
Color:
You're confusing implementing an interface with renaming a strategy.
I'd recommend picking any free C# book or online resource recommended in our Wiki FAQ.
Size:
Color:
That's it:
CODE:
Please log in to see this code.
Size:
Color: