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

RE: CL_Re:Need More Plot Statements? --Here They Are



PureBytes Links

Trading Reference Links

Thanks wayne,

And as you show it in your code, TL_SetStyle(TL, 1) and TL_SetColor(TL,
blue) do not need to be stored into a Variable unless you have to refer to
the value returned later.
Although all the examples written in Omega's EasyLanguage Reference Book use
Value1, Value2,...Value99!

Rgds,

Phil


-----Message d'origine-----
De : Wayne Mathews [mailto:wayne@xxxxxxxxx]
Envoyé : mardi 18 juillet 2000 21:41
À : Philippe Lhermie
Cc : =code-list; =omega list
Objet : CL_Re:Need More Plot Statements? --Here They Are


Hi Phil

The code needs to execute on each bar and "if 2=2 then begin" will cause
that to happen. To omit every bar, "if false ...then plot1()" can be
used (e.g. in the function autoTL used to satisfy the requirement (in TS
4) that every indicator must have a plot statement ), but no plot1 ever
occurs due to false never being true.

I first included the "if ...end" because I understood from A. Putt’s
book and other sources that the TL_New() function must be controlled by
an "if" statement. This turns out not to be true, at least in the cases
I have tried.  As Pierre Orphelin says, "try it, if it works it works".
I just re-posted the code without the "if...end" statement.

 I just realized, in responding to your query, that for this code to
work in TS 4 there must be a plot statement. If there is not a
plotx(y,"") in the indicator being used, then include the following with
the TL_New code package:

If 2=3 then plot1(c,"");	{not needed in TS 2K}

wayne



Philippe Lhermie wrote:
>
> Dear Wayne,
>
> Could you explain to us what is the advantage to test 2=2 which is of
> course, always true?
>
> I read on a TS EXpress issue that it's to include every bar in the test
but
> I don't understand why it wouldn't work without this condition?
>
> Rgds,
>
> Phil
> -----Message d'origine-----
> De : Wayne Mathews [mailto:wayne@xxxxxxxxx]
> Envoyé : mardi 18 juillet 2000 01:42
> À : =code-list; =omega list
> Objet : CL_Need More Plot Statements? --Here They Are
>
> Trendlines, TL, can be made to plot curves not just straight lines by
> using the code below.  Thus TLs can function as a regular plot statement
> so a chart is not now restricted to just 4 plots. The code is easiest
> plotted in with the price data. The code is restricted to 1 minute
> charts or greater as TLs do not work well in tick charts (TS has no
> seconds interval capabilities ). Price() can be changed from the chart
> as it is an input. E.g., Price(average(c,25) or Price(0.25*RSI(c,20))
> (series functions seem to work best). Scaling factors must be taken into
> account when the resulting plot is smaller or larger that the price
> data. User defined scaling will work. There is a limit on how many TLs
> (here bars) a chart can contain, I think a few thousand (or hundred).
>
> input: price(c);
> Var: TL(0);
>
> If 2=2 then begin
>    TL = TL_New(Date[1],time[1],price[1], Date,time,price );
>    TL_SetStyle(TL, 1);
>    TL_SetColor(TL, blue);
> End;
>
> wayne mathews
The Code List -
Subscribe/Unsubscribe
http://www.markbrown.com