// Downloaded From https://www.WiseStockTrader.com
_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,styleCandle);
Buy= Color==colorBrightGreen AND Ref(Color,-1)==colorRed;
Sell=Color==colorRed AND Ref(Color,-1)==colorBrightGreen;
Short=Sell;
Cover=Buy;
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;



PlotShapes( shape, IIf( Buy, colorGreen, colorYellow ), 0, IIf( Buy, Low, High ) );

GraphXSpace = 5;
_SECTION_END();