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

[amibroker] somebody code this up



PureBytes Links

Trading Reference Links

what you losing in the market?
check out my new  stock pattern idea
every day has a pattern correct

the pattern can be in binary the following

pattern1=Ref(Close,-1)<Open;
pattern2=(Ref(MA(Close,10),-1)<Open)*2;
pattern3=(Ref(PVI(),-1)<PVI())*4;
pattern4=(Ref(MFI(14),-1)<MFI(5))*8;
finalpattern=pattern1+pattern2+pattern3+pattern4;


that will give every day a pattern number from 0 to 15

you with me so far

next we  dump the 1 day pattern   1 + 2 day pattern and 1 +2 +3 day 
pattern  the highest % gain in 30days
to the hard drive

so if  day 1  has 5
        day 2 has  6
        day 3 has  15


so everyday  day1 see a 5  we dump the highest % gain
                   day 2 see 5+ day1 see a 5   we dump the highest % 
gain
                  day 3 see a 15 day 2 see 5+ day1 see a 5   we dump 
the highest % gain

that give you a 3 day combo
now you look at the lowest % gain
you can say that 100% time with the pattern you got the lowest% gain

it a good idea but it wont work a $5.00 stock will not have the same  
% gain as a $50.00 stock
so you have to group it in order to group it you take the current 
last price and divide by a number
 the get rid of the remainder.

so if your range from 0 to .25  you would divide the close price  
by .25

if close = .12 /.25 = 0.48   go in group 0
   close = 1 00/.25 = 4      go in group 4  
   close = .99/.25 = 3.96   go in group 3


when outputting to a file the filename should be  
                                                                      
             1day pattern   d1#g#
                                                                      
             2day pattern    d1# d2#  g#                        
                                                                      
             3day pattern    d1# d2# d3# g#

d1 d2 d3 and g is a constant
d1=5 d2=6 d3=15

so a typical  output filename  would be
d15d26d315g4

now the lowest  % is 4% and the pattern came in 5 times can you 
expect the 6 time to give you  a 4% gain

nick