 | Notes for this Trading Account: | A Simple system based upon Bollinger Bands
Rules:
Buy if the Close crosses over the upper Bollinger band Sell if the Close crosses under the lower Bollinger band | Rules for this Trading Account: |
 | Notes for this Trading System: |
 | Rules for this Trading System: |
 | Bar event logic: |
#A system based upon Bollinger Bands
#BB returns two columns in list context, save them to use later.
my ($upper,$lower)=BB(20,2);
#Buy only if we do not have a position.
if (not Position) {
#Buy if the Close crosses over the upper Bollinger band
BuyOpen if Crossover(Close,$upper);
}
else {
#Sell if the Close crosses under the lower Bollinger band
SellOpen if Crossunder(Close,$lower);
}
|