PureBytes Links
Trading Reference Links
|
This is pure Dimitris Tsokakis.
Some caveats: 'we do not know which candle is f i r s t, the 10-day
higher OR the 30-day higher
If the 30-day higher is first [yellow candle], then the 10-day higher
[green candle] will be a bit lower and the line will have negative
slope.
If the 30-day higher is last, then the 30-day AND the 10-day higher
occur THE SAME DAY and the line will be [by convention] horizontal.'
X = Cum(1);
LX = LastValue(X);
COND1 = X >= LX-30 AND H == LastValue(HighestSince(X==LX-30,H,1));
COND2 = X >= LX-10 AND H == LastValue(HighestSince(X==LX-10,H,1));
T1 = LastValue(ValueWhen(COND1,X));
T2 = LastValue(ValueWhen(COND2,X));
TT1 = Max(T1,T2);
TT2 = Min(T1,T2);
dTT = TT1-TT2;
endH = LastValue(ValueWhen(X==TT1,H));
startH = LastValue(ValueWhen(X==TT2,H));
aH = (endH-startH)/dTT;
bH = endH;
trendlineH = IIf(T1!=T2,aH * (X-TT1) + bH,endH);
Plot(IIf(X>=LX-30,trendlineH,Null),"",4,1);
COLOR=IIf(COND1,colorYellow,IIf(COND2,colorBrightGreen,colorBlack));
Plot(C,"C",COLOR,64);
--- In amibroker@xxxxxxxxxxxxxxx, jppt0k <jppt0k@xxxx> wrote:
> look for posts of Dimitris Tsokakis. he was able to trace every kind
of line.
>
> On 03/07/05, nkis22 <nkishor@xxxx> wrote:
> > Thanks Steve. It gives me a line at 30 day high, but I want the
line
> > connecting 30 day high with 10 day high, so often this will not
be a
> > horizontal line but a sloping one
> >
> > nand
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx>
wrote:
> > > Hi Nand,
> > >
> > > Haven't tested it, but I think this would do it:
> > >
> > > ThirtyDayHighLine = IIf( BarIndex() >= BarCount - 30, HHV(
High,
> > 30 ),
> > > NULL );
> > > Plot( ThirtyDayHighLine, "30 Day High", colorRed, StyleLine );
> > >
> > > Steve
> > >
> > > ----- Original Message -----
> > > From: "nkis22" <nkishor@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Saturday, July 02, 2005 8:47 PM
> > > Subject: [amibroker] How to draw a line using code
> > >
> > >
> > > >I want a line drawn from HHV in 30 days and HHV in 10 days,
that
> > is 30
> > > > day H and 10 H points. I can find the values, but how do I
get a
> > line
> > > > spanning 30 days? Any help will be much appreciated.
> > > >
> > > > nand
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Please note that this group is for discussion between users
only.
> > > >
> > > > To get support from AmiBroker please send an e-mail directly
to
> > > > SUPPORT {at} amibroker.com
> > > >
> > > > For other support material please check also:
> > > > http://www.amibroker.com/support.html
> > > >
> > > >
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
> >
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> >
> >
> >
> > ________________________________
> > YAHOO! GROUPS LINKS
> >
> >
> > Visit your group "amibroker" on the web.
> >
> > To unsubscribe from this group, send an email to:
> > amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
> >
> > ________________________________
> >
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|