It seems like a variant of optimal stopping. First you have to decide when to make the first purchase. Then you have a new problem of when to make the next purchase.
Although it's more complicated than that because you also have to decide how much to buy, when you do buy.