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

Re: Text EL code?



PureBytes Links

Trading Reference Links

At 5:18 PM -0800 2/15/98, Phil wrote:
>     I know EL code can be use to paint bars and to put dots etc. over and
>under price bars for showmes etc., but I was wondering if instead of having
>a dot over some price bars for a showme, if an EL code can be written to
>place text over or under bars etc?  Like instead of writting a showme to
>place a dot over the bars, have a letter or work printed over the bars, like
>T for top or P for pivot or R for retracement etc?
>If this is possible would anyone give an example of how the code would be
>written?  Any other information along these lines would be helpful!
>

Attached is code that does something similar to what you required. It is a
part of some other code so may not verify as it stands. Please consider it
as an example of what is required.

Bob Fulks



Vars:  X(FALSE),      {In X column when true, O when false}
       Display(FALSE),{Enables display on this bar}
       StOffset(0),   {Offset to start plotting line under title}
       Str(""),       {String variable to plot text}
       DLine(0),      {Date line value to plot text}
       VLevel(0),     {Vertical level to plot text}
       VOffset(3),    {Vertical offset for text above bars}
       Rng(0),        {Range}

Display = TRUE;
StOffset = 2;
Str = "XXX";

{Display text and line under text}

if Display then begin
  VLevel = Highest(H, StOffset + 1) + VOffset;
  Value4 = StOffset/2;
  DLine  = iff(Mod(StOffset, 2) = 0, 2, 0);

  Value1 = Text_New(Date[Value4],Time[Value4], VLevel, Str);
  Value2 = Text_SetStyle(Value1,DLine,2);
  Value2 = Text_SetColor(Value1,Tool_Yellow);

  Value3 = TL_New(Date[StOffset],Time[StOffset], VLevel, Date, Time, VLevel);
  Value2 = TL_SetColor(Value3, Tool_Yellow);
  Value2 = TL_SetExtLeft(Value3, FALSE);
  Value2 = TL_SetExtRight(Value3, FALSE);
  Value2 = TL_SetAlert(Value3,0);
end;