PureBytes Links
Trading Reference Links
|
Hormuz,
Go to the files section of this group and search for a word document
called 'Using Latches in MS.doc' by Roy Larsen. This should give you
an idea about how solve this problem.
A quick shot would be:
{Trade Latch; Idea by }
{2004 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
Set:=Fml(your long therm buy signal);
Reset:=Fml(your long term sell signal);
Init:=Cum(Set+Reset>-1)=1;
Trade:=If(BarsSince(Init+Set)<BarsSince(Init+Reset),1,-1);
Trade; {swings between +1 and -1}
This gives you an output of +1 for the buy signal and -1 for the sell
signal. Just assign those to your expert signals and you should doing
fine.
Martin
--- In equismetastock@xxxxxxxxxxxxxxx, hormuz maloo
<hormuzmaloo@xxxx> wrote:
> Hi everybody,
> I am trying to program my own expert advisor, which
> gives long-term buy and sell signals.
> Have just got started, but I find that the buy or sell
> signal is repeated everytime the pattern is found on
> the chart.
> What I would like to do is see that a buy signal does
> not follow a buy signal, ie a buy signal should occur
> only if the previous signal was a sell signal and vice
> versa.
> Can somebody please show me a simple way to do this.
> Thanks in advance,
> Hormuz Maloo
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/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/
|