Show indicator in higher bar scale if its value is set intra-week
Author: betatester
Creation Date: 9/28/2020 6:25 PM
profile picture

betatester

#1
I've checked other forum posts and still can't find a way to do this, which seems like it should be easy. All I'm trying to accomplish is to view a weekly chart with signals that were generated on a daily time frame.

E.g. I have an external time series file ("fomc") where any date that has a FOMC meeting is marked with a "1". All other dates are "0". Works fine with a daily chart. But I want to see this on a weekly chart, and because these dates are usually a Wednesday, nothing registers.

CODE:
Please log in to see this code.


It does display when I change from daily to monthly time frame, because some of the dates happened to coincide with the last day of the month.
profile picture

Eugene

#2
I think you cannot alter the synchronization of your Daily DataSeries when viewing a Weekly chart. (Used to think that DataSeries.SumOnCollapse should help but couldn't get it to work here). Probably the best bet is to modify your external data file to mark the remainder bar of the week with a "1". Here's a mockup code that creates a DataSeries for each dummy "quarterly FOMC meeting".

First, run this on Daily to save the modified DataSeries to c:\temp:
CODE:
Please log in to see this code.


Now run this code on Weekly to read back the DataSeries using FillSeriesFromFile:

CODE:
Please log in to see this code.
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).