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

[EquisMetaStock Group] Re: System Tester Brain Teaser



PureBytes Links

Trading Reference Links

Oh now I think it's getting clearer to me :)

Maybe you could try this one:

pl:=mov(c,5,e)>mov(c,30,e); {Permission long}
cr:=pl>ref(pl,-1); {This is the crossover}
sc:=Cross(H,(ValueWhen(1, Fml("SwingHigh"),H)));
pl and barssince(Fml("SwingHigh"))<barssince(cr) and sc;

Regards,

mc

--- In equismetastock@xxxxxxxxxxxxxxx, Kevin Barry <kevin_barry@xxx>
wrote:
>
> Hello MC,
> 
> Many thanks for your reply.
> 
> Unfortunately, the trade is still triggered at the high of the last 
> SwingHigh bar even if it occurred before the MA cross. However, you are 
> absolutely correct to point out that there could have been a trend
change 
> since the alert so it would be necessary to code:
> 
> Alert(Cross(Mov(C,5,E),Mov(C,30,E)),10)
> AND
> Mov(C,5,E)>Mov(C,30,E)
> AND
> .....SwingHigh condition......
> 
> Regards,
> Kevin
> 
> 
> 
> At 02:20 PM 1/25/2009 Sunday, you wrote:
> 
> >If I get it right, then you could simply write:
> >
> >Mov(C,5,E)>Mov(C,30,E) AND
> >Cross(H,(ValueWhen(1, Fml("SwingHigh"),H)))
> >
> >This way, you are in permission long mode since you have the
> >short-term moving average above the mid-term one.
> >The code that you wrote cannot check whether there has been a change
> >in the smas' level condition, thus leaving the possibility that there
> >has been a "trend" change before your swing-high formula got into
action.
> >
> >Regards,
> >
> >mc
> >
> >--- In 
>
><mailto:equismetastock%40yahoogroups.com>equismetastock@xxxxxxxxxxxxxxx, 
> >Kevin Barry <kevin_barry@>
> >wrote:
> > >
> > > Hello,
> > >
> > > I have created a formula for a swing high condition called
SwingHigh.
> > >
> > > I would like the following sequence of events to occur in my system
> >test:
> > >
> > > 1. 5MA crosses above 30 MA
> > >
> > > 2. Swing High condition occurs.
> > >
> > > 3. Go long when the price breaks above the Swing High
> > >
> > > I have coded the following:
> > >
> > > Enter Long:
> > >
> > > Alert(Cross(Mov(C,5,E),Mov(C,30,E)),10)
> > > AND
> > > Cross(H,(ValueWhen(1, Fml("SwingHigh"),H)))
> > >
> > > The problem is that the tester does not restrict the SwingHigh
> >condition to
> > > AFTER the MA cross. It uses the last SwingHigh value even when
it has
> > > occurred before the MA cross.
> > >
> > > I have tried adding this:
> > >
> > > BarsSince(Cross(Mov(C,5,E),Mov(C,30,E))) > BarsSince(ValueWhen(1,
> > > Fml("SwingHigh"),H))
> > >
> > > It doesn't make any difference.
> > >
> > > Any suggestions for specifying the order of events in the System
Tester
> > > would be welcome.
> > >
> > > Many thanks in advance.
> > >
> > > Regards,
> > > Kevin
> > >
> >
> >
>



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

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/