On the condition test to enter long or short, I've added to the logic:
&& OptimalFLong>.001
or && OptimalFShort>.001

It "seems" to be doing what I want so far. We'll see...

Regarding data snooping (which this is not IMO, since I'm getting the OptimalF reading from recent past, ultimately the most recent Train cycle)... I think you have to strike a balance between data-mining bias and what you are ultimately trying to accomplish.

For example, I am not building a holy grail bot. I am building slop-bot that I expect will be trash at some point in the future. If it gives me a slight edge in the present, that's what I'm looking for. Of course, I also have to be able to detect when it has become useless...