[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LastTickLine



PureBytes Links

Trading Reference Links

Ian,

>The code below is for an indicator I use in TS4 that simply plots a
>horizontal line back from the currentbar close. I believe it was
>posted on OL several years back. It is handy to be able to instantly
>see where the close is in relation to the rest of the chart.
>To work, the indicator needs to be placed in the Hidden subgraph even
>though the prompt asks for subgraph 1.

I see no reason why one would place it in a hidden subgraph.  It should
work in TS2000i and TS7 in the same subgraph as your price data.

>I am now trying to use it with TS7. Nothing shows when placed in the
>Hidden subgraph. Has anyone any idea what changes need to be made to
>to the code get this to work?

Try not putting it in a hidden subgraph.
-Alex

>Code starts ************************************
>
>Inputs: Price(C), color(12), width(0);
>Vars: tl(0), col(0), wid(0);
>
>If CurrentBar =20 then begin
>        col=color; wid = width;
>        if col < 1 or col > 16 then col = 6;
>        if wid < 0 or wid >6 then wid = 0;
>
>        tl = tl_new(d[10],t[10],c,d,t,c);
>        tl_setcolor(tl,col);
>        tl_setstyle(tl,0);
>        tl_setsize(tl,wid);
>        tl_SetExtLeft(tl,true);
>end else
>        if LastBarOnChart and CurrentBar > 20 then begin
>        tl_setend(tl,d,t,c);
>        tl_setbegin(tl,d[20],t[20],c);
>End;
>
>Plot1(Price,"Close");