Why do weekly series change values on last bar of chart?
Author: skalman99
Creation Date: 11/21/2011 7:41 AM
profile picture

skalman99

#1
Hi

The strategy below plots weekly close. Why does it change value on last bar of chart, even if it's not a Friday? How can I stop it doing that?

Regards Jon Brewer

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

Eugene

#2
QUOTE:
Why does it change value on last bar of chart, even if it's not a Friday?

What's wrong with it? Why shouldn't it change value if you feed in more bars? Just two examples. Some international markets can trade on Saturdays. Friday can be a holiday.

Making compressed bar available on last bar of period is Wealth-Lab's default behavior. You can change it so that previous compressed bar becomes available on the first bar of period by shifting the dsWeeklyClose DataSeries one bar forward - according to this KB article:

Intraday / Multi-Time Frame | Compressed price series alignment
CODE:
Please log in to see this code.
profile picture

skalman99

#3
Eugene,

I guess there is nothing wrong with that. In a sense it is a good idea because it takes more data into account. But... I need to duplicate the behaviour of a trading system developed in another tool. This other tool did not update the weekly close until the week had in fact closed. After close on Friday (or whatever day was the last trading day of that week) the weekly close series would be updated to reflect the close of the week. Until the next Friday close the weekly close series then remained constant.

The WL6 design is like having an intraday "ghost" bar that jumps around all day, except on a higher time-frame.

My solution to this will be to develop some C#-code that will detect that today is the last day of a week. Only if today is the last day of the week then the weekly series will be updated, otherwise they will remain constant.

Regards Jon
profile picture

Eugene

#4
Jon,

I see your point and like the proposed workaround.
profile picture

Cone

#5
If you're trading a weekly system, why are you wasting your time looking at the chart during the week?

One of the advantages of trading weekly is that you need only to update your data once per week, run the strategy, and place market or GTC orders. You're done for the week; go and enjoy your free time or work your normal job.
profile picture

skalman99

#6
Hi Cone,

The system uses weekly and daily timeframes.

Regards Jon
profile picture

Cone

#7
In that case, then you shouldn't be looking at the Weekly chart, you must use Daily charts. When you synchronize weekly time frames with Daily data, i.e., your code uses SetScaleWeekly()... then Synchronize(), you'll get the closing values of the previous week. You will not get the daily updates as shown in the Weekly chart.

If this isn't clear, just plot your Weekly series on a Daily chart and you'll see that the weekly data are updated only after the Friday close.
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).