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

Re: [EquisMetaStock Group] Latch Code Question


  • Date: Thu, 18 Mar 2010 07:11:31 -0000
  • From: "skypilot_jw" <jweidner@xxxxxxxxxx>
  • Subject: Re: [EquisMetaStock Group] Latch Code Question

PureBytes Links

Trading Reference Links


Hi Rob,

Thanks again for your help.



--- In equismetastock@xxxxxxxxxxxxxxx, Rob Tinley <gazumped2@xxx> wrote:
>
> Hi Skypilot,
>  
> buytrigger:=
> C>Mov(C,8,E);
>  
> buyformula:=
> Ref(buytrigger, -1)  AND H>Ref(H,-1);
>  
> exittrigger:=
> Cross(Mov(C,21,E),C);
>  
> exitformula:=
> Ref(exittrigger, -1) AND OPEN>0;
>  
> If you substitute the above code into my initial example as it should work okay.
>  
> {Alternate code for buytrigger}
> 
> buytrigger:=
> Cross(C,Mov(C,8,E); 
> {Only 1 trigger given each time the Close crosses above the Moving Average}
> 
>  
> 
> 
> --- On Sat, 13/3/10, skypilot_jw <jweidner@xxx> wrote:
> 
> 
> From: skypilot_jw <jweidner@xxx>
> Subject: Re: [EquisMetaStock Group] Latch Code Question
> To: equismetastock@xxxxxxxxxxxxxxx
> Received: Saturday, 13 March, 2010, 4:29 PM
> 
> 
>   
> 
> 
> 
> 
> 
> Hi Rob,
> 
> Thanks for the detailed reply. I must be doing something wrong as I can't get the code to work properly. If my buy formula is C>Mov(C,8,E) and my exit formula is C<Mov(C,21,E) would you show me exactly where these would go in your code. Thanks again for your help.
> 
> --- In equismetastock@ yahoogroups. com, Rob Tinley <gazumped2@ ..> wrote:
> >
> > You will need to include your full entry code for "trade" to be effective.
> > � 
> > Below is a detailed example showing the buytrigger as only 1 component of the buyformula. The same is also applicable to the exit.
> > � 
> > {Expert Adviser - Highlight bars when in Trade}
> > buytrigger:=
> > Sum(C>Ref(C, -1),3)=3;
> > buyformula:=
> > Ref(buytrigger, -1)�  AND OPEN>Ref(C,- 1);
> > exittrigger: =
> > Sum(C<Ref(C, -1),2)=2;
> > exitformula: =
> > Ref(exittrigger, -1) AND OPEN<Ref(C,- 1);
> > set:= buyformula;
> > reset:= exitformula;
> > init:=Cum(set+ reset>-1) =1;
> > trade:=BarsSince( init OR set)<BarsSince( init OR reset);
> > trade
> > � 
> > � 
> > {Expert Adviser - BuyTrigger Symbol}�  {Also use this code for Explorations}
> > {Will only show buytriggers when not in a trade}
> > buytrigger:=
> > Sum(C>Ref(C, -1),3)=3;
> > buyformula:=
> > Ref(buytrigger, -1)�  AND OPEN>Ref(C,- 1);
> > exittrigger: =
> > Sum(C<Ref(C, -1),2)=2;
> > exitformula: =
> > Ref(exittrigger, -1) AND OPEN<Ref(C,- 1);
> > set:= buyformula;
> > reset:= exitformula;
> > init:=Cum(set+ reset>-1) =1;
> > trade:=BarsSince( init OR set)<BarsSince( init OR reset);
> > trade<1 AND buytrigger
> > � 
> > � 
> > {Expert Adviser - ExitTrigger Symbol}
> > {Will only show exittriggers when in a trade}
> > buytrigger:=
> > Sum(C>Ref(C, -1),3)=3;
> > buyformula:=
> > Ref(buytrigger, -1)�  AND OPEN>Ref(C,- 1);
> > exittrigger: =
> > Sum(C<Ref(C, -1),2)=2;
> > exitformula: =
> > Ref(exittrigger, -1) AND OPEN<Ref(C,- 1);
> > set:= buyformula;
> > reset:= exitformula;
> > init:=Cum(set+ reset>-1) =1;
> > trade:=BarsSince( init OR set)<BarsSince( init OR reset);
> > trade AND exittrigger
> > � 
> > � 
> > For BuyTrigger Explorations use the code for the EA - BuyTrigger Symbol
> > 
> > --- On Fri, 12/3/10, skypilot_jw <jweidner@ .> wrote:
> > 
> > 
> > From: skypilot_jw <jweidner@ .>
> > Subject: [EquisMetaStock Group] Latch Code Question
> > To: equismetastock@ yahoogroups. com
> > Received: Friday, 12 March, 2010, 5:21 PM
> > 
> > 
> > �  
> > 
> > 
> > 
> > I use MS 9.0 EOD and have set up an expert with the usual buy and sell latch parameters of:
> > 
> > set:= buy formula;
> > reset:= exit formula;
> > init:=Cum(set+ reset>-1) =1;
> > trade:=BarsSince( init OR set)<BarsSince( init OR reset);
> > trade
> > AND Alert(trade= 0,2)
> > 
> > I also use the same code in the explorer to find securities which have triggered.
> > 
> > My question is this.
> > When my expert triggers a buy signal, I place a buy order for the next day based on the high of the triggered signal. If the market price the next day does not exceed the high, then my buy order is not executed. However, the code has latched the security and will not reset until the latch code triggers the exit formula (Close below 21 EMA for example). After the market close when I run another exploration, the same security will not appear on the explorer report because it is stll latched (has met the entry formula but hasn't triggered the exit formula). Is there a way to code it so that when a security triggers a buy, and the following day's high is lower than the previous day's high, the latch exits and will re-latch when the buy formula is met again.
> > 
> > Thanks for your help with this.
> >
>




------------------------------------

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:
    equismetastock-digest@xxxxxxxxxxxxxxx 
    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/