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

Re: [EquisMetaStock Group] Programming Buy Signal Using EOD



PureBytes Links

Trading Reference Links

Hello,

I assume that you want to create a system test....................?

There is a dirty workaround that you can try which, unfortunately, makes use of the dreaded forward reference. The idea is to shunt your entry signal forward a day thereby 'tricking' Metastock into thinking that yesterday's bar is today's.

So, let's say that you wanted to test a classic swing entry; after three lower highs, buy when price rises above yesterday's high at yesterday's high:

Ref(
(Ref(H,-3) <= Ref(H,-4) AND
 Ref(H,-2) <= Ref(H,-3) AND
 Ref(H,-1) <= Ref(H,-2))
AND
Mov(C,20,E) > Mov(C,50,E)
AND
H > Ref(H,-1)
,+1)

Set the entry price to high and the delay to zero. You will find that the buy signals on the chart are printed on 'yesterdays' bar but for the purposes of the equity curve, you are entering the trade at yesterday's high with today's bar being the entry signal. Change it to the close for your own purposes.

I hope that helps.

Regards,
Kevin







At 18:16 13/01/2005 +0800, you wrote:

Hi, I wanted to program buy and sell signals such buy at yesterday close
price on today's bar using only EOD.

However MS only allow signals using OHLC and only occur on the following
day. This pose a contraint. I had search the forum and googled but no
potential results. Anyone can circumvent this problem in programming?

Thanks.





Yahoo! Groups Links


Yahoo! Groups Links