♥ 0 |
Hi Pete, Been following you for a while, watching your videos multiple times. Wanted to pick you brain. Looking to create a strategy for Dollar Cost Averaging (buying a certain number of stocks every so often) but couldn’t find a simple way of doing this. I tried to code something myself and came up with a not-so-elegant solution. Upper Strategy: input tradeSize = 1;
Lower Study: plot signal = Getday() % 25 == 1;
It seems to be partly doing what I want it to do (buy a certain number of stocks every so often), but it is skipping certain months (highlighted in the attached image, circled in red) and looks a bit sporadic. I would prefer to buy once a period (once a month), but can’t figure out how to do it. Really appreciate it! RESOLVED
Marked as spam
|
Please log in to post questions.