Assuming my algorithm forecasts that a security x will rise for y hours; is this the correct way to emit this insight?

self.EmitInsights((Insight(x.Symbol, timedelta(hours=y), InsightType.Price, InsightDirection.Up)))

If so, is it correct to emit this insight before my algorithm places the order to purchase x?

When I wish to liquidate this holding, does the algorithm need to emit a further insight which indicates that the position will be flattened? And if yes, how is this done correctly?

 

Author