My strategy calls for rebalancing at each new quarter. As I step through each new bar how do I detect the start of a new quarter? I am able to do it if the year is a constant, but unfortunately it's a variable. Thanks.
CODE:
Please log in to see this code.
Size:
Color:
Here's how:
CODE:
Please log in to see this code.
Size:
Color:
Thanks. It worked great. The only mod I did was to change:
if( Bars.Count > 1 )
to
if( (Bars.Count > 1) & (bar > 1) )
to cover the call with bar = 0
Size:
Color:
Right, but it makes zero sense to call it with bar 0: Wealth-Lab won't let you trade at bar #0 because the basis price for orders has not been determined yet.
Size:
Color: