Hello, I have a strategy that changes background color when a signal triggers on a weekly time frame for the S&P 500. My chart window is approximately 800px wide. No matter how much I minimize bar spacing, I can only fit about 10 years of history on the chart, then need to scroll to see past signals. Is there a way to get the bar spacing so that I can fit the entire price history into the chart?
Size:
Color:
Hi,
You might have noticed how this is solved by various charting websites. To fit the whole history they step up the time frame. You can do the same by switching to Monthly, Quarterly or Annual charts.
Size:
Color:
No way to affect it programmatically in a strategy:
CODE:
Please log in to see this code.
Size:
Color:
That doesn't always work. E.g. I reference an external indicator showing FOMC meeting dates. They show fine on daily, but when changing to a weekly time frame, they disappear.
Size:
Color:
This is pretty expected if the Weekly (Quarterly, whatever) ending date is different from the FOMC meeting date. But it's an altogether different problem which can be approached in a different forum topic (e.g.
Trade on Fed (FOMC) Announcement Dates) or you can start a new one if your code is different.
Size:
Color:
The (e.g. Trade on Fed (FOMC) Announcement Dates) thread wasn't anything like I was referencing. I started a new thread with the code, and that was deleted after a response that didn't address the topic (though which I tried anyway with no success). I could find no other threads which addressed this specific issue.
My code points to a daily time series file when a date (typically a Wednesday) shows a 1 when the condition is triggered. All other days show a zero. When plotting this on a daily time frame chart, it works fine. When changing to weekly to get a broader perspective, it disappears because it doesn't recognize that Wednesday was part of that week. All I'm looking for is a way to display more history than is currently allowable.
Size:
Color:
Size:
Color: