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

Re:Code help - text in a signal



PureBytes Links

Trading Reference Links


There are many references to text on a chart at
http://purebytes.com/archives . Mario's post reminded me of one I did on
the code-list (20 Oct 1999 12:17) which adds (makes visible) input
values on the chart in TS 4 (TS2K now shows these inputs). That post can
be simplified using Massimo Ciarafoni's idea of defining the top of the
chart with an invisible plot1(Highest(H,len) + incr,""), except the plot
is not necessary in TS 4 only the Highest high. 

To try the code, add it to the "Mov Avg 2 line" indicator in any time
frame chart. It works in real time. Add more elements to the string Z if
more than two inputs are used. The numerical parameters (120, d[10],
t[10]) may need adjusting. Change the names of len1 and len2 for other
inputs and reference their values by changing the names length1 and
length2.

var: Z(""), Q(0);

Z="len1= "+ NumToStr(length1,0)+"  "+"len2=  "+NumToStr(length2,0);

If lastbaronchart then begin
  Q=Highest(h,120);
    if value6=0 then begin	
      value7=Text_New(d[10],t[10], Q , Z);
      value6=1;
    end;      {this lower code controls the final positioning}
      value8=Text_Delete(value7);
      value7=Text_New(d[10],t[10],Q , Z);
      Text_SetStyle(value7, 1, 1);
      text_setcolor(value7,2);
End;


> 
> Subject:  Code help - text in a signal
>  Date: Fri, 5 Apr 2002 12:04:47 +0200
> From:  "marika11" <marika11@xxxxxxxxx>
>  To: <omega-list@xxxxxxxxxx>
> 
> Hi,
> I usually put 3 chart in a workspace with the same strategy but different
> inputs; I'd like recognize what input in every chart without looking at
> format analysis techniques.
> Can You point me a way to show the strategy's inputs on the chart (on the
> last bar I think), id est a formula (for the text) to add to my signal code?
> thanks
> Mario