Metastock.....could anyone help please?


Junior member
I have been attempting to write a formula in Metastock to filter stocks for the following condition...

1..Stock moves down thru 20day MA....

2. Makes two troughs inside the Bands without reaching the lower band bottom, the troughs must be made inside the channel between (80% of thew difference betwen the lower band and the 20day MA) and (the 20 day MA)...

Any help would be massively appreciated, and apologies to any coding genius for my being a pleb.


Metastocks formula

Need a bit more info....
Is the price allowed to go above the 20 day ma between the troughs.... ??
Thanks for replying Outsider , much appreciated.

The price action should not go above the 20 day MA before the two troughs as described.

Thanks again.
Hello Outsider

If it helps further, the condition i am attempting to filter is best described on the BTG Group (BGC) chart ...towards the end of Sept 2001.

BarsSince error

Hi again

I tried to slap together an exploration and came across a bug in Metastocks 6.52 ... It struggles to do BarsSince (close = trough(2,....))

When I get past that problem it is plain sailing....

Hang on
Hello Outsider...

I have Metastock 7.2 Pro, please post the code (even though there is a bug in the 6.52 version) and i will test it.

Thanks again for your help, i will be happy to reciprocate the gesture in the future.


hi guys
Any news on this exploration?

I'm currently tring to write an exploration (Metastock 7.02) to find stocks who have a high outside the top Bollinger Band and a subsequent lower high inside the Bands.

(Also exploration for lows outside bottom BB and subsequent higher low inside band)

The exploration in this thread may be of use.

Reason for this exploration - the price very often swings to the lower band (or upper) band.