A flow moves in one direction at a time by definition, because it can't be both negative and positive simultaneously.
It sounds like what you're looking for is some kind of logic determining which way the flow runs, e.g. IF some_condition THEN positive_flow ELSE negative_flow. However, it might be possible to construct a more continuous equation, which is frequently most appropriate for aggregate models.
However, it's hard to say more without some description of your problem - what does the stock-flow structure represent, what physics or decision does the flow represent, units of measure, etc.