Moving Average CO Strength

fflaque

Junior member
Messages
14
Likes
0
This is coded in tradestation, easy to configure to other platforms...

{ TrendArea_2 Indicator WAV 9/15/04

9/16/04 added FastLen and SlowLen inputs
}

inputs: ThresholdArea(25),FastLen(13),
SlowLen(30);


vars: BarCount(0),SlowMA(0),FastMA(0),
color(0),area(0);





SlowMA = xaverage(close,SlowLen);
FastMA = xaverage(close,FastLen);

{ see if we have a new possible trend starting }
if FastMA crosses above SlowMA or
FastMA crosses below SlowMA then
BarCount = 0;

BarCount = BarCount + 1;

{ multiply each individual area by its barcount }
area = BarCount * (FastMA - SlowMA);


color = IFF(area > area[1] and area > 0,green,yellow);
if color = yellow and area < area[1] then
color = DarkGreen;
color = IFF(area < area[1] and area < 0,red,color);
if color = yellow and area > area[1] then
color = DarkRed;

plot1(area,"Area",color);
plot2(0,"zero line");



basically it is the number of bars since the crossover multiplied by the difference of the fast and slow moving averages.
 

Attachments

  • ecurve009.jpg
    ecurve009.jpg
    82.4 KB · Views: 448
As with all MA based systems though fflaque, it doesn't really give you a trend indication until it's well started and no protection from whip-saw.

I guess if you're into the longer timeframe and use it in conjunction with a more robust market strength indicator it would be useful.

Thanks for the code.
 
TheBramble said:
As with all MA based systems though fflaque, it doesn't really give you a trend indication until it's well started and no protection from whip-saw.

I guess if you're into the longer timeframe and use it in conjunction with a more robust market strength indicator it would be useful.

Thanks for the code.

no problem...i use this mostly for exits, not entries btw
 
Top