Hi all,
I wrote a custom strategy to backtest and its taking more than 10 mins to run for 6 months worth of data. Here is the bulk of my code and was wondering if any of you could see anything that would improve the performance. I wrote to support but they sent me here. Below is my email. I've attached the java code as it was too long.
Really appreciate any feedback!
Thank you !!
I wrote a custom strategy to backtest and its taking more than 10 mins to run for 6 months worth of data. Here is the bulk of my code and was wondering if any of you could see anything that would improve the performance. I wrote to support but they sent me here. Below is my email. I've attached the java code as it was too long.
Really appreciate any feedback!
Thank you !!
I am trying to test my strategy and to run the report for about 6 months, it is taking around 10 minutes. I think that is really really long. Below is the code that I am using. Can you tell me if it can be made more efficient so that It runs quicker? Ideally I'd like it not to take longer than 30 seconds to a minute. I copied most of the code from MACross study. May be some of the code can be removed to increase speed of processing. Not sure why we need `onLoad()` method. And I know i am not doing it the suggested way where I create a study for signal and then create a strategy for submitting orders. Wasn't sure if that would increase the efficiency.
I only need to see the fast ma and slow ma on the chart
I need previous values of fast and slow MA's , 20 and 34 emas and previous values of high and low, current 5 period atr to figure out the order entry conditions.
thank you !!