|
- _SECTION_BEGIN("NOT_SO_SIMPLE");
- cmopds=11;
- CMO_1=Sum( IIf( C > Ref( C, -1 ) , ( C - Ref( C ,-1 ) ) ,0 ) ,cmopds ) ;
- CMO_2=Sum( IIf( C < Ref( C ,-1 ) , ( Ref( C ,-1 ) - C ) ,0 ) ,cmopds );
- Smooth=5;
- CMO=100 * (( CMO_1 -CMO_2) /( CMO_1+CMO_2));
- AbsCMO=(abs(CMO))/100;
- SC=2/(Smooth+1);
- MM=AMA( C, SC*AbsCMO );
- EM1= EMA(C,5);
- EM2= EMA(EM1,5);
- Dif= EM1-EM2;
- EM= EM1+Dif;
- x=EM-MM;
- color=IIf(EM>MM,colorBrightGreen,colorRed);
- Plot(C,"Chaloke Not-So-Simple Moving Average",Color,stylebar);
- Buy= Color==colorBrightGreen AND Ref(Color,-1)==colorRed;
- Sell=Color==colorRed AND Ref(Color,-1)==colorBrightGreen;
- Short=Sell;
- Cover=Buy;
- shape = Buy * shapeSmallCircle + Sell * shapeSmallCircle;
- PlotShapes( shape, IIf( Buy, colorGreen, colorYellow ), 0, IIf( Buy, Low, High ) );
- GraphXSpace = 5;
- _SECTION_END();
複製代碼 |
|