I have a problem.
I have 200 stocks, 3 strategy and 1-min streaming data from IQfeed. I try to make online stocks scanner for special graphics patterns.
If strategy scan 200 stocks at once, execution time exceed 1 min and strategy have a lag with real time. I separate 200 stocks to 10 sets with 20 stocks in each. In result I have 30 strategy executions. Usually strategies finished at time, but some strategies can’t update by time (some can’t execute by time) and Next Run time lag from real time for 2, then 3, then 10 minutes.
How can I resolve this problem?
How I can set Next Runt time = actual time = 1 min?
Thanks!
P.S. Internet connection, CPU and RAM use less than 50%
Sorry for bad English.
Size:
Color:
Next Runt time = actual time + 1 min
Size:
Color:
Sounds like your Strategy takes too much time to run with regard to selected bar scale? In other words, its execution time may get to or even exceed 1 minute? If this is the case, we'd like to suggest that you examine its code for bottlenecks and optimize it using all means available (logic optimization, performance profiling etc)
Wealth-Lab strategy performance profiling
http://www.wealth-lab.com/Forum/Posts/Wealth-Lab-strategy-performance-profiling-29988
Size:
Color:
When trading live, make sure to minimize resources:
1. Only load the data that you need. Make sure you're not loading months of data when you need only 2 weeks, for example.
2. Strategy execution is usually very fast (milliseconds) but all the post processing of trades in Performance visualizers can add 'seconds' to each execution. Create a Workspace of Strategy Windows with the minimum amount of Visualizers. When trading, you probably need only a Trades view for reference.
Size:
Color:
Robert, I think that krewtrades runs his Strategies in the SM, hence 'Next Run time'. If this is the case, performance visualizers are not a factor as they're not processed by the SM.
Size:
Color:
Yes, I run it all at strategy monitor on streaming data. I load only 2000 bars of history. There is no way to set next run time for strategy?
Size:
Color:
Or can I set that strategy runs one time in two minutes (using 1-min scale)?
Size:
Color:
Intraday strategies execute whenever a new bar arrives. If you want to run every 2 minutes, then change the Activation Settings to use a 2-minute bar interval.
You do not want to "skip bars" to run the strategy every other bar on a 1-min scale. You would miss alerts and would quickly cause your system to get out of sync with reality.
Size:
Color:
Can I manually set strategy next run time in code? (next run = actual time + 1 min)
Size:
Color:
No.
Size:
Color: