door JPR » ma 22 sep 2003, 21:25
Paul Bedankt......... zal je het resultaat binnenkort melden. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Voor de liefhebbers... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? input: Price(Close), Length(10), BodyLen(10);
vars: BearEngulfing(False), ShortEntryPrice(0), UpTrend(False),
DownTrend(False), AvgBody(0), HighestC(0), LowestC(999999);
{ Setup calculations }
UpTrend = XAverage( Price, Length ) > XAverage( Price, Length )[1] ;
DownTrend = XAverage( Price, Length ) < XAverage( Price, Length )[1] ;
AvgBody = Average( AbsValue(Close - Open), BodyLen );
BearEngulfing = ( Open > Close AND
?Open[1] < Close[1] ) AND
( Open > Close[1] AND Close < Open[1] ) AND
( Open - Close > AvgBody * 1.25 ) AND
( Close[1] - Open[1] < AvgBody * .75 );
if UpTrend and BearEngulfing thenShortEntryprice = Low;
{ Entry orders }
if MRO( UpTrend and BearEngulfing, 3 , 1) > -1 AND MarketPosition <> -1 then
Sell Short next bar at ShortEntryPrice stop;
How it works: ? ?A bullish engulfing pattern is defined as a large, hollow real body that engulfs a small, filled real body in a downtrend. Which a bearish engulfing pattern is defined as a large, filled real body that engulfss a small, hollow real body in an uptrend.
These patterns are indicative of a reversal in direction of the price movement. For example, it can be argued that if the market is in an uptrent, and you find a Bearish Engulfing pattern, a trend reversal is likely, and vice versa.
This strategy uses an exponential moving average to determine the trend direction. It states that the market is in an uptrend when the 10 bar exponential average is greater than the same average of one bar ago. And the opposite will mark a bullish trend.
A large body is defined as a body that is at least 125% larget than the average body of the last 10 bars. When the strategy finds an uptrend and a bullish engulfing pattern it will establish a short position, and if the market is in a down trend and the market develops a bearish engulfing pattern the strategy will establish a long position.
Inputs: ? ?Input Name Default Value Description ?
Price ?Close Price used to calculate the exponential average
Length ?10 Period, defined in number of bars, to use when calculating the exponential average
BodyLen ?10 Number of bars to use in calculating the average size of the real body
?