It depends on the context....
There is a disadvantage in selling stock when the price is low.
What is the disadvantage of selling stock when the price is low?
I wish I could give you a rule but I am afraid you are just going to have to learn the common forms.... Using prepositions is confusing even for native speakers.
Student or Learner