I'm not programmer many times I'm lucky and able to copy and paste together some afl's. I'm reading Connors book and came across bollinger system.Look like would be easy to co but I'm stuck
rules are
price close above 200ma
%b must close bellow>2 for 3days
buy on close
this what I hve done so far but is not working .Can anybody help me to corecte and finish this afl
_SECTION_BEGIN("bb%2");
Graph0 = (Close - BBandBot (Close, 20, 2))
/ ((BBandTop (Close, 20, 2) - BBandBot (Close, 20, 2)));
Plot( Graph0, "%b indicator", colorYellow );
bb=(Close - BBandBot (Close, 20, 2))/ ((BBandTop (Close, 20, 2) - BBandBot (Close, 20, 2)));
Buy=Close < Ref(bb,.20)AND Ref(C,-1)< Ref(bb,.2)-1 AND Ref(C,-2)< Ref(bb,.2)-2;
Sell=Close>Ref(bb,.80);
_SECTION_END();
Your help is very appreciated
Thank you
rules are
price close above 200ma
%b must close bellow>2 for 3days
buy on close
this what I hve done so far but is not working .Can anybody help me to corecte and finish this afl
_SECTION_BEGIN("bb%2");
Graph0 = (Close - BBandBot (Close, 20, 2))
/ ((BBandTop (Close, 20, 2) - BBandBot (Close, 20, 2)));
Plot( Graph0, "%b indicator", colorYellow );
bb=(Close - BBandBot (Close, 20, 2))/ ((BBandTop (Close, 20, 2) - BBandBot (Close, 20, 2)));
Buy=Close < Ref(bb,.20)AND Ref(C,-1)< Ref(bb,.2)-1 AND Ref(C,-2)< Ref(bb,.2)-2;
Sell=Close>Ref(bb,.80);
_SECTION_END();
Your help is very appreciated
Thank you