I'm pretty new to this game and am having trouble searching for solutions to questions I have, so thought I'd post here.
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?
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.