WealthLab.Rules and DateRules.IsLastTradingDayOfQuarter
Author: novendeh
Creation Date: 4/26/2011 9:41 PM
profile picture

novendeh

#1
Below is some coding generated using the wizard. I have a question about C# or C.net and the subject line.

Where do I find more info on the above? I searched wiki and this site, pdf manuals, and can't seem to find anything. Am I missing something.


CODE:
Please log in to see this code.
profile picture

Eugene

#2
It's here:

Wealth-Lab WealthScript Programming Guide > WealthLab.Rules Classes > DateRules.
profile picture

changhengyiu

#3
Hi Eugene
I am trying to trade on the last day of week with daily scale setting
I see function IsLastTradingDayOfMonth and IsLastTradingDayOfQuarter but no IsLastTradingDayOfWeek.
How can I do ?
profile picture

Eugene

#4
Hi Hank,

There isn't but you could use the method called TomorrowIsLastTradingDayOfWeek in Community Components:

CODE:
Please log in to see this code.
profile picture

Eugene

#5
Alternative approach:

CODE:
Please log in to see this code.
profile picture

algotradingwl

#6
Hi!
I am trying to simulate a purchase at the opening of the 2nd day of the quarter, and a sale at the 1st day. It works on a single symbol.
But when I make a purchase of a set of symbol and make backtest on all symbols in DataSet, it doesn't work.
Tell me plz, what can be a mistake.
ie:
DataSet: aapl, baba, dis, fb, mrk, msft, pypl, qcom, twtr
Portfolio Simulation Mode: Percent of Equity 30

CODE:
Please log in to see this code.
profile picture

Cone

#7
You should to reset tiker to 0 on every bar, but the big problem is that you're not resetting the class variable nabor between symbol runs. Anyway, here's an optimized way to do it. Notice that _naborList is cleared if executing a bar outside of the date ranges.

CODE:
Please log in to see this code.
profile picture

algotradingwl

#8
QUOTE:

You should to reset tiker to 0 on every bar, but the big problem is that you're not resetting the class variable nabor between symbol runs. Anyway, here's an optimized way to do it. Notice that _naborList is cleared if executing a bar outside of the date ranges.

Thank you very much!
The code works as it should!
I will delve into the subtleties!
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).