An update, I switched from using a 3000017 sized array for the TT into using a 1048583 sized array, but this time it is a two dimentional array that holds another "inner" array of 4 entries in each index. that means that there is more room for entries (4000000+). The replacement scheme is roughly the same, i check to see if an identical position is found, if not i check to see if i still have room to store a new entry (e.g if there are null entries) and if not, i just push out the oldest one out of the array and insert the new one. so every time the oldest entry get to be dropped out... and so on.
Actually i don't know what is the difference between using this kind of Table and using a single linear array with more positions. ( like i did before). if it turns out that the two tables are roughly the same, than i suppose that using a single array is better and faster (no need for searching operations, i just immediately replace an entry)
and If i do a full game tree search i don't use a depth parameter so replacing "by depth" schmeme is useless.