I would like to know the best way to automate some once-only tasks.
For example, when I place orders I don't care much about postiion size, but I do care about the $ risked. Such a program would take entry price, stop-loss price and risk amount, then calculate the position size and place the appropriate order. There is no more to do after that.
I thought one way would be to use a strategy, do the work in Initialize() and simply put a return statement in OnBarUpdate(). However, the strategy remains running.
There is probably a better way, but I don't have the experience to know it and didn't find anything about it when I searched the forum.
I'd appreciate any advice.
Cheers
Tony
Comment