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

[EquisMetaStock Group] Re: System Tester Brain Teaser



PureBytes Links

Trading Reference Links

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 equismetastock@xxxxxxxxxxxxxxx, Kevin Barry <kevin_barry@xxx>
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/