PureBytes Links
Trading Reference Links
|
KM
Buy
Mov(C,20,E) > Ref(Mov(C,20,E),-4) AND
C < Ref(C,-4)AND
C > Ref(C,-24)
Not sure if this is what you want for a sell
Mov(C,20,E) < Ref(Mov(C,20,E),-4)AND
C > Ref(C,-4)AND
C < Ref(C,-24)
POMPATIS@xxxxxxx wrote:
> Greetings:
>
> I have a very simple system i would like to write in metastock, but i am
> lousy at programming. Any help is hugely appreciated.
>
> Following is the system in english stated 2 ways:
>
> first way:
>
> Buys: 1) requires the average close of x days to be greater than the same
> average close y days ago. 2) requires the close to be less than the close y
> days ago. 3) requires the close to be greater than the close y + x days ago.
> Then buy on the open the next day.
>
> Sells are the inverse of the buys and the system simply reverses upon a new
> signal. Protective stops have not been determined.
>
> Now in plain english (I think): let x = a 20 period exponential ma, and y is
> a 20 period exponential ma displaced by 4 periods. Then the average close of
> the previous 20 days must be greater (for buys) than the average close of the
> last 20 days starting 4 days ago. Then today's closing price must be less
> than the closing price 4 days ago. Finally, the close must also be greater
> than the close of 24 day's ago.
>
> I tried to program this but do not know how to formulate a displaced ma in
> metastock. Thanx for any help folks.
>
> Sincerely,
>
> KM
|