PureBytes Links
Trading Reference Links
|
Thanks much Clyde, I've been wanting something like this for a
while. Is there a modification that can be made to force the boxes
to consistently start at the beginning of each new date on an
intraday chart? For example, on a 5 min time frame, with NBars set
to 3 (i.e., attempting to encapsulate three 5 min bars in order to
represent a 15 min bar), occasionally the last one or two 5 min bars
from the prior date will be used as the first, or first and second,
of the three bars used to generate the first box for a given date and
this will result in all the subsequent boxes being incorrectly
shifted so that it can be seen that the boxes don't match up with
actual 15 min bars plotted as data2. The boxes periodically regain
and then lose their proper shifting over the course of time (days).
The problem is due to the data on multiple days not being perfectly
consistent (and so the "Shift" input doesn't help in this regard) ,
and not with your indicator per se. I've tried a number of different
things without success. It seems as if one possibility could be to
use a second MOD function with CURRENTTIME to force the boxes to
begin at precise time intervals, but I haven't been able to make it
work (e.g., Mod(CurrentTime,0015) = 0 in the case of 15 min bars). I
couldn't get anything using Date > Date[1] to work either.
Thanks,
Mark
--- In realtraders@xxxx, Clyde Lee <clydelee@xxxx> wrote:
> A client of mine asked if there were some way in which it might be
> possible to display multiple time frames on a single chart.
>
> The attached NBarBox indicator is an attempt to do so.
>
> This is not very sophisticated or fancy but I was surprised at some
> of the results as I "played" with this.
>
> Junk5.gif is the purpose for which this was designed.
>
> The other two .gif files show a somewhat different approach to the
> use of this routine.
>
> I'm not including an .els since it is just too easy to cut and
> paste the following into your editor and save it as NBarBox
indicator
> or whatever you want to call it.
>
> TS4 users are invited to modify this (and hopefully post the
results)
> in which the early trendlines are deleted once you reach a level of
> 600 or so trendlines.
>
> Clyde
>
>
>
> {Indicator: NBarBox}
>
> {Purpose: Draw a box covering NBars with the bottom of the
> box corresponding to the Lowest Low in the NBars
> of the group and the top of the box being the
> Highest High in the group.
>
> Vertical lines are drawn at the beginning and end
> of the group of bars and extends from LL to HH.
>
> Use: Display higher time frame on chart.
>
> Problems: ONLY FOR TS2000 unless you add something to insure
> only the most recent 600 or so trendlines are
> drawn -- that would cover 150 groups.
>
> DO NOT APPLY TO A VERY LONG DATA SERIES AS IT WILL
> TAKE A VERY LONG TIME TO UPDATE ! ! !
>
> Author: Clyde Lee, Copyright 2001
>
> Permission: This application for Omega Tradestation can be
> freely distributed with proper credit.
> }
>
> Input: NBars(4), {Number of bars to be included in box }
> Shift(0), {Move starting bar by amount entered }
> LColor(red), {Line color for box }
> LSize(0); {Line size for box }
>
> Vars: MBars(NBars-1),HH(0),LL(0);
>
> If Mod(CurrentBar,NBars)=Shift then begin
> HH=Highest(H,NBars);
> LL=Lowest(L,Nbars);
> Value1=TL_New(Date[Mbars], Time[MBars], HH, Date, Time, HH);
> Value2=TL_New(Date[Mbars], Time[MBars], LL, Date, Time, LL);
> Value3=TL_New(Date[Mbars], Time[MBars], HH, Date[MBars], Time
[MBars], LL);
> Value4=TL_New(Date, Time, HH, Date, Time, LL);
> TL_SetColor(Value1, LColor);
> TL_SetColor(Value2, LColor);
> TL_SetColor(Value3, LColor);
> TL_SetColor(Value4, LColor);
> TL_SetSize(Value1, LSize);
> TL_SetSize(Value2, LSize);
> TL_SetSize(Value3, LSize);
> TL_SetSize(Value4, LSize);
> End;
>
>
>
>
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Clyde Lee Chairman/CEO (Home of SwingMachine)
> SYTECH Corporation email: clydelee@xxxx
> 7910 Westglen, Suite 105 Office: (713) 783-9540
> Houston, TX 77063 Fax: (713) 783-1092
> Details at: www.theswingmachine.com
> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|