PureBytes Links
Trading Reference Links
|
Hi Sebastian,
I think this is best solved by looking at the way in which your binary
indicator is generated. If you use say a 10 and 20 day moving average
and have it at 1 if the 10 day is above the 20, then you should not
have any signals for the first 20 days, and thereafter you should
start generating signals. But, if you construct the binary correctly,
in this case as
Trend := Mov(C,10,S) > Mov(C,20,S)
then it will not contain any data, not even 0, for the first 20 days
and should work fine. So I suggest you look at the way in which it is
calculated and from this you should get the correct number of periods
to wait, and this again should be reflected in the formula and
eventually the results.
Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com
--- In equismetastock@xxxxxxxxxxxxxxx, "Jose Silva" <josesilva22@xxxx>
wrote:
>
> Sebastian, an easy solution here would be to code your binary so it
> plots -1 on short trade periods, +1 on Long, 0 when neither. In
> effect, your binary would now be a trinary plot.
>
> Take a look at the "Trade signals" MS code in the "System/signal
> indicators" section of http://www.metastocktools.com/#metastock
>
>
> jose '-)
> http://www.metastocktools.com
>
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, sebastiandanconia <no_reply@xxx
> .> wrote:
> >
> > I've run into a problem with a binary signal and can't quite get my
> > mind around how to solve it.
> >
> > I have a trend-following indicator where a binary signal "1"
> > indicates "Up" and "0" indicates "Down." I sell-short on minor
> > rallies when the trend-following indicator is at "0."
> >
> > When the binary indicator starts out (at the beginning of the data
> > being tested) it's at "0", but there may or may not be an actual
> > downtrend according to my trend definition. I may get a false
> > signal to sell-short even though the trend isn't actually down, just
> > because the indicator arbitrarily starts out at "0."
>
> >
> > I've read Roy's article about latches (and I've used his "Init"
> > trick) but haven't been able to puzzle out how to address this
> > problem.
> >
> > Is there a way out of this dilemma without waiting for a cycle
> > of "buy" and "sell" to initialise, which will exclude trades at the
> > beginning? Any way of taking all the trades according to the actual
> > conditions, so I don't have to kick out any first "false" trades by
> > hand during testing? Or is it simply better to exclude those first
> > trades so that I only get "true" signals?
> >
> > TIA for any guidance on this.
> >
> >
> > Luck to all,
> >
> > Sebastian
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|