 | Notes for this Trading System: |
 | Rules for this Trading System: |
 | Bar event logic: |
#RSI and Stochastics system
#Basic Stochastics system, but with additional rule:
#The rsi must be less than 30.
#Get the Stochastics columns
my ($adx,$plus,$minus)=ADX(3);
unless (Position) {
#Buy if the %k crosses above %d and if %k is less than 20
if (Crossover($plus,$minus) and Today(WilliamsR(14))<-10 and Today($adx)>30) {
#Output ('+DI is '.Today($plus).' and -DI is '.Today($minus).' ADX is '.Today($adx).' WilliamsR is '.Today(WilliamsR(14)));
BuyOpen;
}
if (Crossunder($plus,$minus) and Today(WilliamsR(14))> -90 and Today($adx)>30) {
SellOpen;
}
}
else {
#Sell if the %k crosses under the $d and if %k is greater than 20
if (Crossunder($plus,$minus) or Crossunder(WilliamsR(14), -25)) {
SellOpen;
}
if (Crossover($plus,$minus) or Crossover(WilliamsR(14), -75)) {
BuyOpen;
}
}
|