[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Different Session Times for the IB Database



PureBytes Links

Trading Reference Links

I have the candlestick commentary from the afl library and I want to test the 60 odd bullish and bearish patterns defined in the script against individual stock to get some idea of the relative reliability of individual candle signals for each stock. To do the counting I have cannibalized part of another script from the library on price persistency : // setup Pattern pat=HERE IS WHERE I WANT TO TEST THE 60 ODD SIGNALS; /*********************************************************/ // # of patterns pat1=Cum(pat); //# of bars bars=Cum(1); //% Pattern Cond1=(Cum(pat)/Cum(1))*100; /************************************/ //# Wins // 1 day up after pattern Day1up=Cum(Ref(pat,-1) AND C> Ref(C,-1)); Day1down=Cum(Ref(pat,-1) AND C < Ref(C,-1)); // 2 days up after pattern Day2up=Cum(Ref(pat,-2) AND Ref(C,-1)>Ref(C,-2) AND C> Ref(C,-1));//2 days up Day2down=Cum(Ref(pat,-2) AND Ref(C,-1)Ref(C,-3) AND Ref(C,-1)> Ref(C,-2)AND C > Ref(C,-1));//3 days up Day3down=Cum(Ref(pat,-3) AND Ref(C,-2) Ref(C,-1))/Cum(pat))*100; Day1downpercent=(Cum(Ref(pat,-1) AND C < Ref(C,-1))/Cum(pat))*100; Day2upPercent=(Cum(Ref(pat,-2) AND Ref(C,-1)>Ref(C,-2) AND C> Ref(C,-1))/Cum(pat))*100; Day2downPercent=(Cum(Ref(pat,-2) AND Ref(C,-1)Ref(C,-3) AND Ref(C,-1)> Ref(C,-2)AND C > Ref(C,-1))/Cum(pat))*100; Day3downPercent=(Cum(Ref(pat,-3) AND Ref(C,-2)