PureBytes Links
Trading Reference Links
|
Jose.....triple Dutch to me!! I feel like a tulip whacked by a windmill....
Let me try again:
The Entry signal is when the Short term RWIL spikes through 1 while the Long term RWIH is above 1.
The Exit signal is when the Short term RWIH spikes trough 1 while the Long term RWIL is above 1
1) If Entry & Exit appears on the same bar and it is the FIRST signal, the trade can be ignored for this purpose. It has not happened yet in the different data sets I have tested (i.e. the first trade has not been Entry & Exit on the same bar), but it can conceivably happen.
2)If Entry & Exit signals appear on the same bar and the previous signal was long, then give preference to the short signal.
3)If Entry & Exit signals appear on the same bar and the previous signal was short, then give preference to the long signal.
Your #2 option does not signal a trade when the two signals appear on one bar.
..........hope this is clearer. I appreciate your help.
Carl
----- Original Message -----
From: Jose Silva
To: equismetastock@xxxxxxxxxxxxxxx
Sent: Sunday, November 12, 2006 8:51 PM
Subject: [EquisMetaStock Group] Re: EST long bias problem
Carl, I'm having trouble understanding your request - the description
reads like double dutch to me. :) (Apologies for the pun)
The most difficult part of programming any strategy, is understanding
and getting the idea across to others. A strategy may at first seem
easy to understand from its creator's point of view, but translating
it into understandable terms for others is quite an art form.
Try explaining the problem in logical terms:
1) If Entry & Exit signals appear on the same bar, give preference to
... signal;
2) If Entry & Exit signals appear on the same bar, and previous bar
was Long, give preference to ... signal;
3) If Entry & Exit signals appear on the same bar, and previous bar
was Short, give preference to ... signal;
... And so on.
jose '-)
http://www.metastocktools.com
--- In equismetastock@xxxxxxxxxxxxxxx, "Carl van
Heerden" <cj.vh@xxx> wrote:
>
> Hi Jose,
>
> I appreciate your reply.
>
> The difference between the MA cross-over used in your example and
the RWI is that the RWI signals the start of the trade with a one
bar "spike" through 1. The indicator might stay above 1 for several
bars or might return to below one immediately, but the signal will
still be valid (unlike with a MA where the signal reverses when C
crosses the MA). The reverse RWI signal (say the SHORT signal)
takes place when a slightly different indicator spikes through 1.
This might even happen while the "Long" indicator is still above 1.
This would still indicate a reversal. I want the system to then take
the opposite position, even though both signals are above one. The
Alert function is difficult to use in this case.
>
> Regards
>
> Carl
>
>
>
>
> ----- Original Message -----
>
> From: Jose Silva
> To: equismetastock@xxxxxxxxxxxxxxx
> Sent: Saturday, November 11, 2006 10:56 AM
> Subject: [EquisMetaStock Group] Re: AST long bias problem
>
> Carl, take a look at the indicator code below, and in particular
> note how option #2 deals with same-bar trades.
>
> MetaStock -> Tools -> Indicator Builder -> New ->
> -> copy & paste complete formulae between "---8<---" lines.
>
> ====================
> System trade signals
> ====================
> ---8<---------------------------
>
> { System trade signals v3.2
>
> ©Copyright 2005-2006 Jose Silva
> For personal use only.
> http://www.metastocktools.com
>
> Note on simultaneous entry/exit on same bar:
> #[1] Ignore:
> entry/exit signals cancel each other;
> #[2] Preference (given to):
> new entry if currently Short,
> new exit if currently Long.}
>
> { Signals reference example }
> entry:=C>Mov(C,21,E);
> exit:=C<Mov(C,10,E);
>
> { User inputs }
> plot:=Input("Signals: [1]Clean, [2]All, [3]Trade binary",1,3,1);
> choose:=Input("Simultaneous entry/exit: [1]Ignore,
> [2]Preference",1,2,2);
> delay:=Input("Entry and Exit delay",0,5,0);
>
> { Initialize signals }
> init:=Cum(IsDefined(entry+exit))=1;
>
> { #1 - Ignore entry/exit on same bar }
> bin1:=ValueWhen(1,entry-exit<>0 OR init,entry);
> long:=bin1*(Alert(bin1=0,2)
> OR entry*Cum(entry)=1);
> short:=(bin1=0)*(Alert(bin1,2)
> OR exit*Cum(exit)=1);
> signals1:=long-short;
>
> { #2 - Preference to first entry/exit }
> long:=entry*(Alert(entry=0,2)
> OR entry*Cum(entry)=1);
> short:=exit*(Alert(exit=0,2)
> OR exit*Cum(exit)=1);
> bin2:=ValueWhen(1,long-short<>0 OR init,long);
> long:=bin2*(Alert(bin2=0,2)
> OR entry*Cum(entry)=1);
> short:=(bin2=0)*(Alert(bin2,2)
> OR exit*Cum(exit)=1);
> signals2:=long-short;
>
> { Select #1 or #2 }
> binary:=If(choose=1,bin1,bin2);
> signals:=If(choose=1,signals1,signals2);
>
> { Plot in own window }
> Ref(If(plot=2,entry,0),-delay);
> Ref(If(plot=1,signals,
> If(plot=2,-exit,binary)),-delay)
>
> ---8<---------------------------
>
> jose '-)
> http://www.metastocktools.com
>
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Carl van Heerden" <cj.vh@>
> wrote:
>
> Hi Jose,
>
> Here is the basic code
>
> To go long:
> RWIL(opt1,opt2)>1
>
> AND RWIH(opt3,opt4)>1
>
> To go Short:
> RWIH(opt1,opt2)>1
>
> AND RWIL(opt3,opt4)>1
>
> Straight forward, until it happens that both triggers are on the
> same bar. Then the Order Bias is forced either Long or Short
> according to your choice in EST. As I wrote before, the trades need
> to alternate.
>
> Regards
>
> Carl
__________ NOD32 1862 (20061110) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|