DYO: Colored Bars based on a Higher Time frame Bar


Q:  I would like the bars on Lower time frame charts to be Colored based on a Higher time frame bar.  For example, if I open a 10-minute chart (as the Higher time frame), and then open 5-minute, 2-minute, and 1-minute charts as the Lower time frames, I want the color of the Lower time frame bars to ALTERNATE between Blue and Red for each 10-minute bar.

A:  The following 2 DYO studies will do what you want.  Apply the  1315-HigherTF  template to the  10-minute chart.  Apply the  1315-LowerTF  template to all the Lower time frames.  The Lower time frame bars will then start to be colored based on the Higher time frame.  The colors will only update as of when you apply the Templates.  The Templates will not color the past history bars.  In other words, it only works in real-time as new bars are being created.  If you close all the charts, and then re-open them, then the coloring will start over.

The Higher and Lower templates will work on any Time Frame.  Example, your Higher time frame could be a 60-minute chart, and the Lower time frames could be any time that is less than 60.  The only limitation of these Templates is that you can only have 1 Higher time frame in use at one time (unless you create a different set of  DYOs that use different Global Values).  For example, you can't have a MSFT.60 chart running the Higher Template, and an  IBM.30 chart also running the Higher Template.  They will conflict with each other.

Here is the 1315-HigherTF DYO.

Here is the 1315-LowerTF DYO.

Here is a screen capture of a MSFT.10  (as the Higher), and  MSFT.5,  MSFT.2,  and MSFT.1  (as the Lower time frames).  I applied the HigherTF template to the  10-minute chart, and the  LowerTF template to the other charts.  After running for about 50 minutes I took the following screen capture.  You can see how each chart's bars alternated Colors each time a new 10-minute bar started.

Templates:  1315-HigherTF  and  1315-LowerTF


Last modified 1/17/08 11:55 AM