ha funny you should mention tricks, i tought a gold fish to do back flips first in the water then jumping into the air like a seaworld whale. and a algae eater to push around a marball, well he learned that on his own, i just observed it and enceraged it.
the gold fish took me about a month to two months, first whaever fish your training has to get used to you and like with all pets they are trained with food rewards. i made it follow my hand in the tank(while holding a food stick) for a while then i made it follow intill it did back flips(barral rolls) in the tank, all while feeding it in the tank only when it compleats the trick i had my hand on the out side of the tank and it followed the fool around then i cut back the food, it eventualy realized that whenever i made a circular motion in the glass it was going to get food if it did a flip, then i tought it to jump. then i put in some other fish it got ick and died...
the only reason i had the goldfish was to cycle my cichlid tank but i figured i'd have some fun with it. cichlids are smarter and learn faster, but often more skidish, right now i trying to teach my milawies to eat from my hand, only one is doing it for now.