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

Re: [EquisMetaStock Group] Re: System Tester Brain Teaser



PureBytes Links

Trading Reference Links

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 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
>

__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___