1 MACDK线波段
Params
Numeric FastLength(12);
Numeric SlowLength(26);
Numeric MACDLength(9);
Vars
NumericSeries MACDValue;
Numeric AvgMACD;
Numeric MACDDiff;
NumericSeries aa12;
Numeric aa13;
Begin
MACDValue = XAverage( Close, FastLength ) - XAverage( Close, SlowLength ) ;
AvgMACD = XAverage(MACDValue,MACDLength);
MACDDiff = MACDValue - AvgMACD;
PlotNumeric("MACD",MACDValue);
PlotNumeric("MACDAvg",AvgMACD);
If (MACDDiff >= 0)
PlotNumeric("MACDDiff",MACDDiff,Red);
Else
PlotNumeric("MACDDiff",MACDDiff,Green);
PlotNumeric("零线",0);
aa12=MACDValue;
aa13=AvgMACD;
If(aa12-aa13>0)
{
PlotNumeric("high",aa12);
PlotNumeric("Low",aa13);
PlotNumeric("Close",aa12);
PlotNumeric("Open",aa13);
}
Else
{
PlotNumeric("high",aa13);
PlotNumeric("Low",aa12);
PlotNumeric("Open",aa13);
PlotNumeric("Close",aa12);
}
//
End
2 翻译文华论坛里的《波段王》
Params
Numeric M1(13);
Numeric M2(60);
Numeric M3(34);
Numeric M4(667);
Vars
NumericSeries aa1;
NumericSeries aa2;
NumericSeries aa3;
NumericSeries aa4;
NumericSeries aa5;
NumericSeries aa6;
NumericSeries aa7;
NumericSeries aa8;
NumericSeries aa9;
NumericSeries aa10;
NumericSeries aa11;
NumericSeries aa12;
NumericSeries aa13;
NumericSeries aa14;
NumericSeries bb;
Begin
bb=M4/1000;
aa1=Highest(High,M1)-Lowest(low,M1);
aa2=Highest(HIGH,M1)-CLOSE;
aa3=CLOSE-Lowest(LOW,M1);
aa4=((aa2/aa1)*100)-70;
aa5=(((CLOSE-Lowest(LOW,M2))/(Highest(HIGH,M2)-Lowest(LOW,M2)))*100);
aa6=(((2*CLOSE)+HIGH)+LOW)/4;
aa7=WAverage(100*aa3/aa1,3);
aa8=Lowest(LOW,M3);
aa9=WAverage(aa7,3)-WAverage(aa4,9);
if(aa9>100)
{
aa10=aa9-100;
}Else
{
aa10=0;
}
aa11=Highest(HIGH,M3);
aa12=SAverage((((aa6-aa8)/(aa11-aa8))*100),M1);
aa13=SAverage(((bb*aa12[1])+((1-bb)*aa12)),2);
If(aa12-aa13>0)
{
PlotNumeric("high",aa12);
PlotNumeric("Low",aa13);
PlotNumeric("Close",aa12);
PlotNumeric("Open",aa13);
}
Else
{
PlotNumeric("high",aa13);
PlotNumeric("Low",aa12);
PlotNumeric("Open",aa13);
PlotNumeric("Close",aa12);
}
aa14=SAverage(aa13,5);
PlotNumeric("aa14",aa14);
End
3 nopain 老师编写的《顾比倒数线》
Params
Numeric Length(5);
Vars
Bool ConTmp;
NumericSeries CBLHi;
NumericSeries CBLLo;
Begin
If(High Lowest(Low,Length))
{
CBLLo = CBLLo[1];
}Else
{
ConTmp = High[2] > High[1] High[2] > High High[1] > High;
If(ConTmp)
{
CBLLo = High[2];
}Else
{
ConTmp = (High[3] > High[2] High[3] > High[1] High[3] > High) And
(High[2] > High || High[1] > High);
If(ConTmp)
{
CBLLo = High[3];
}Else
{
ConTmp = (High[4] > High[3] High[4] > High[2] High[4] > High[1] High[4] > High) And
(High[3] > High || High[2] > High || High[1] > High);
If(ConTmp)
{
CBLLo = High[4];
}Else
{
ConTmp = (High[5] > High[4] High[5] > High[3] High[5] > High[2] High[5] > High[1] High[5] > High) And
(High[4] > High || High[3] > High || High[2] > High || High[1] > High);
If(ConTmp)
{
CBLLo = High[5];
}Else
{
CBLLo = CBLLo[1];
}
}
}
}
}
If(CBLHi Close)
{
PlotNumeric("CBLLo",CBLLo,Magenta);
PlotNumeric("Open",Max(Open,Close));
PlotNumeric("Close",Min(Open,Close));
}Else
{
PlotNumeric("CBLLo",InvalidNumeric);
PlotNumeric("Open",Close);
PlotNumeric("Close",Close);
}
}
//
PlotNumeric("High",High);
PlotNumeric("Low",Low);
End