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

Re: drawing text object



PureBytes Links

Trading Reference Links

Hi Bob

Thanks for fast reply.

Your code will draw object on subgraph for data1.

I am interested in drawing objects in subgraphs for
indicator or data2 or data3 or ... .

Any other ideas?

Thanks again

ed


--- Bob Fulks <bfulks@xxxxxxxxxxxx> wrote:
> At 10:28 PM -0700 7/30/01, ed garib wrote:
> 
> >How can I draw text object on upper right corner of
> >the indicator subgraph?
> 
> 
> The following may be about what you need. This finds
> the highest and lowest prices over some number
> (Length) of bars and calculates a price at which to
> draw the text.
> 
> Bob Fulks
> 
> 
> Vars: Length(200), HH(0), LL(0), Loc(0), ID(0),
> Str1(""),
> 
> Str1 = "This is the text";
> 
> if LastBarOnChart then begin
>   Str1 = "This is the text";
> 
>   HH = Highest(High, Length); {Find highest price
> over past Length bars}
>   LL = Lowest(Low, Length);   {Find lowest price
> over past Length bars}
>   Loc = HH - 0.1 * (HH - LL); {Calc price near top
> of span}
>   ID = Text_New(Date, Time, Loc, Str1);  {Draw text}
>   Value1 = Text_SetColor(ID, Tool_Red);  {Set color}
>   Value2 = Text_SetStyle(ID, 1, 2);      (Set style
> and justification}
> end;
>