It returns 0 in training because otherwise it would enter a trade depending on your code. I can't tell why your csv contains wrong values, so check your script.

There are lots of examples of the advise function, with or without custom objective.The current beta version has also two more advise scripts. It should be no problem to modify one of the examples for your needs.