I have about 14 custom indicators within my strategy.
All of which are being instantiated within the State == State.DataLoaded block.
And they are slowing down my strategy even when I am returning at the very start of every OnBarUpdate .
My Strategy is running OnPriceChange calculation.
Any advice on better ways to use less CPU when using this many indicators? Each indicator pretty much needs to know what happened in the last N number of bars too. Some Indicators only need to be ran once per day or once per 60 mins which I do account for when I am actually using the values returned from the indicator. But like I said, even if I am doing nothing in the OnBarUpdate, it still slows down the strategy.
I'm talking about running the strategy on historical data by the way. Literally just one day of historical data but it takes about 5-10mins just to run through 4 hours of historical data on a 20 range bar (during the euro session too).
Any advice?
Cheers,
Tarik

but I was just wondering if it may be beneficial to instantiate the indicators in another way so they don't have to run on every OnBarUpdate (on price change). because I only need a select few once per day I could just instantiate that indicator once within a function and call it only once rather than have it be instantiated in the State == State.DataLoaded which means like you said it'll run on every OnPriceChange. If that makes sense?
Comment