The reason why you are able to predict "high to high" and not "close to close" IMHO is very simple: when you predict "high to high" you are not forecasting the future,...
how do you calculate "p", is it just the sum of theorical profit at day 0 + profit at day 1 + .. + 9 ?
e.g. if r[t] are the returns at day t,
for(t=0;t<9;t++) p+= r[t] > 0 ? r[t]...