Doc,
Here we go,
I have attached the chart for your reference.
Here is the AFL which i have.
Let me know whats the Problem? What went Wrong.
=========================================================
_SECTION_BEGIN("Price MA BB");
Plot(MA(C,5),"MA C 5", colorRed,styleLine);
Plot(MA(C,6),"MA C 6", colorBlack,styleLine);
Plot(BBandTop( Close, 9, 2 ), "BBandTop 9 2", colorBlue,styleLine);
Plot(BBandBot( Close, 9, 2 ), "BBandBot 9 2", colorBlue,styleLine);
Buy = Cross(MA(C, 5), MA(C, 6));
Sell = Cross(MA(C, 6), MA(C, 5));
_SECTION_END();
_SECTION_BEGIN("Price MA BB");
Plot(MA(C,5),"MA C 5", colorRed,styleLine);
Plot(MA(C,6),"MA C 6", colorBlack,styleLine);
Plot(BBandTop( Close, 9, 2 ), "BBandTop 9 2", colorBlue,styleLine);
Plot(BBandBot( Close, 9, 2 ), "BBandBot 9 2", colorBlue,styleLine);
Buy = Cross(MA(C, 5), MA(C, 6)) AND V > 250000;
Sell = Cross(MA(C, 6), MA(C, 5)) AND V > 250000;
_SECTION_END();
_SECTION_BEGIN("Price MA BB");
Plot(MA(C,5),"MA C 5", colorRed,styleLine);
Plot(MA(C,6),"MA C 6", colorBlack,styleLine);
Plot(BBandTop( Close, 9, 2 ), "BBandTop 9 2", colorBlue,styleLine);
Plot(BBandBot( Close, 9, 2 ), "BBandBot 9 2", colorBlue,styleLine);
Avg_vol = (Ref(Volume,-4)+ Ref(Volume,-3)+ Ref(Volume,-2)+ Ref(Volume,-1)+ Volume)/5;
Buy = Cross(MA(C, 5), MA(C, 6)) AND Avg_vol > 250000;
Sell = Cross(MA(C, 6), MA(C, 5)) AND Avg_vol > 250000;
_SECTION_END();
_SECTION_BEGIN("Price MA BB");
Plot(MA(C,5),"MA C 5", colorRed,styleLine);
Plot(MA(C,6),"MA C 6", colorBlack,styleLine);
Plot(BBandTop( Close, 9, 2 ), "BBandTop 9 2", colorBlue,styleLine);
Plot(BBandBot( Close, 9, 2 ), "BBandBot 9 2", colorBlue,styleLine);
Avg_vol = (Ref(Volume,-4)+ Ref(Volume,-3)+ Ref(Volume,-2)+ Ref(Volume,-1)+ Volume)/5;
Buy = Cross(MA(C, 5), MA(C, 6)) AND Close > Open AND Avg_vol > 250000;
Sell = Cross(MA(C, 6), MA(C, 5)) AND Close < Open AND Avg_vol > 250000;
=========================================================
Regards,
Arvind