Back to Community
New to algos: Buying in lots and triggering a buy after a certain percentage decline

Hi all,

I'm pretty new to this game and am having trouble searching for solutions to questions I have, so thought I'd post here.

  1. How to do tell my algorithm to buy in lots?
    For example, if I have $100k and say I want to buy $10k worth every day that the value of my stock is below the average value over the last month, how would I do this?

  2. How do I tell my algorithm to buy stock every time the performance over the past week was, say, worse than -2%?

Either examples of this or links that can help me find an answer would be greatly appreciated.

Thank you.