in Search

daily and weekly data in one chart

Last post 03-03-2006, 0:58 by hayseed. 9 replies.
Sort Posts: Previous Next
  •  03-02-2006, 5:15 15181

    daily and weekly data in one chart

    Hi ,

    Is there any way to have one chart with both daily and weekly data displayed together?



    cheers,

    oradba
  •  03-02-2006, 6:48 15182 in reply to 15181

    Re: daily and weekly data in one chart

    Oradba

    An indicator such as this one can plot weekly prices on EOD charts, but it is not possible to plot actual weekly bars in the same chart window as far as I'm aware. Weekly price as shown below make it possible to plot many weekly indicators on EOD bars. See www.metastocktips.co.nz or Jose Silva's website at www.metastocktools.com

    {Weekly OHLC}
    {© 2005 Roy Larsen, www.metastocktips.co.nz}
    {Use with Jose Silva's "Calendar Week counter" on EOD charts}

    {User settings}
    Q:=Input("Weekly OHLC Mode, 0=Static 1=Dynamic 2=Delayed",0,2,1);
    {0, update at last bar of current frame}
    {1, update on each new bar}
    {2, update on first bar of new frame}

    {Timing module for weekly frames}
    I:=Fml("Calendar Week counter");
    A:=DayOfWeek();
    G:=LastValue(Highest(Sum(A=5,5))=5);
    I:=I-ValueWhen(2-G,1,I);
    M:=G+I;
    F:=G+(M=0 AND PeakBars(1,A,1)=0);
    A:=LastValue(Cum(1)-1)=Cum(1);
    B:=Alert(A,2)*(A=0);
    J:=If(F,1,If(Alert(F,2)=0 AND M,2,0));
    J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
    J:=If(G,1,If(Q=2 OR Cum(J)<=1,M*2,J));

    {Prices for weekly frames}
    Ow:=ValueWhen(1,M,O);
    Ow:=ValueWhen(1,J,If(J=1,Ow,ValueWhen(2-G,1,Ow)));
    Hw:=HighestSince(1,M,H);
    Hw:=ValueWhen(1,J,If(J=1,Hw,ValueWhen(2-G,1,Hw)));
    Lw:=LowestSince(1,M,L);
    Lw:=ValueWhen(1,J,If(J=1,Lw,ValueWhen(2-G,1,Lw)));
    K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
    Ow:=ValueWhen(1,Ow>0,Ow);
    Hw:=ValueWhen(1,Hw>0,Hw);
    Lw:=ValueWhen(1,Lw>0,Lw);

    {Plot results}
    Ow; Hw; Lw; K; {Weekly OHLC}


    Roy
    MetaStock Tips & Tools
  •  03-02-2006, 22:52 15195 in reply to 15181

    Re: daily and weekly data in one chart

    You can also use the twc external formula or the powerpivot plus add-on to create multi time frame indicators
  •  03-02-2006, 22:57 15196 in reply to 15181

    mix and match

    hey roy.... small note here.... its possible to plot both weekly and daily bars in the same pane..... the 5th bar will overlap.... as you know, the trick to see that 5th daily bar would be to change the color and weight of the daily....

    sometimes its best to plot the weekly in its own pane.... that will allow for a limited degree application of indicators to both the weekly and daily.... i purposely changed midstream from weekly to daily in the chart below to show the ma latch to the daily bars.....


    i have not yet used your and jose's method of applying weekly to daily, but feel your method will be far superior to mine....... i used 'aa there but any will do...... you can mix and match.....h'
  •  03-02-2006, 23:14 15197 in reply to 15181

    Re: mix and match

    Henry


    I found the syntax of the TWC external formlas even more confusing than my MFL formulas. Maybe one day I'll check them out again.

    I tend to avoid dlls that are not free and so I have not done any work with Power Pivots. Once again, maybe one day.


    Roy
    MetaStock Tips & Tools
  •  03-02-2006, 23:23 15198 in reply to 15181

    Re: mix and match

    Hayseed


    I see both daily and weekly plots on some of your charts but I don't know how you're doing that. Please tell me and put me out of my misery.


    Roy
  •  03-03-2006, 0:06 15199 in reply to 15181

    Re: mix and match

    Here is the link for the TMW Dll

    http://forum.equis.com/drm_main.php?mode=drm_file_view&cat=8&file=47

    Here is the Multi time frame OHLC

    Factor:=Input("TFactor",0,1000,1);
    offset:=Input("Offset", 0, 1000, 0);
    SO:=ExtFml("PowerPivots.TDataCreate",0,Factor);
    SH:=ExtFml("PowerPivots.TDataCreate",1,Factor);
    SL:=ExtFml("PowerPivots.TDataCreate",2,Factor);
    SC:=ExtFml("PowerPivots.TDataCreate",3,Factor);
    SO:=ExtFml("PowerPivots.TDataLocalize", SO, factor, offset);
    SH:=ExtFml("PowerPivots.TDataLocalize", SH, factor, offset);
    SL:=ExtFml("PowerPivots.TDataLocalize", SL, factor, offset);
    SC:=ExtFml("PowerPivots.TDataLocalize", SC, factor, offset);
    SO;SH;SL;SC;

    A TFactor of 1 will plot the base periodocity of OHLC

    A Tfactor of 2 on an intraday chart will plot the base periodocity X 2 of the OHLC

    IE: a 5 min chart is displayed and you plot this indicator with a TFactor of 2 will plot the OHLC of a 10 Min chart onto the 5 min chart

    A Tfactor of 2 on an daily chart will plot the weekly periodocity of the OHLC onto the daily chart

    Offset will move the plot to the right
  •  03-03-2006, 0:25 15200 in reply to 15181

    Re: mix and match

    Hayseed, I tried your trick of plotting 2 time frames on top of each other.
    I found that you have to create one from your local data and the other time frame from Reuters datalink or Quotecenter, Now drag and drop onto the lower time frame and merge to scale

    Indicators were somewhat distorted

    I could not get 2 charts from local data set at different time frames to plot on top of each other
  •  03-03-2006, 0:35 15201 in reply to 15181

    cut and paste

    hey roy.... its the simple things that are at times the hardest for me to see..... most often i would just open the daily and then open the weekly then cut and paste the weekly in a new window on the daily.... or either just drop it on the daily....

    i again used the 'aa' chart but removed the daily bars that were placed on the weekly in previous post ..... i use power , thanks marilyn, pivots quite abit now ..... even though i don't fully understand the coding..... prior to having power p this was my method of seeing the higher time frame relation......

    after the chart is set, creating a template helps......h
  •  03-03-2006, 0:58 15203 in reply to 15181

    indicators

    hey henry..... the indicators will be somewhat limited ..... you can use local data but at times you'll have to be careful of the folder path.... by that i mean if your trying to plot the daily 'dia' in candlestick form on top of the daily 'dia' in bar form, the 2 daily 'dia's must come from different folders.....

    thats why using local data for one and datalink/qc for the other will work for you.... different paths.....

    i have a folder with every security in the daily, weekly, and monthly time frames in it..... using that method the folder can be the same..... just opening any will allow you to drag and drop or copy and paste any on any.... my use was primarily on the etf's..... and i had templates made up to apply to other securities......

    power p has become my prefered method for multi time frame comparisons now..... h
View as RSS news feed in XML