Use opening price for submission check for Market orders when
cheat-on-open is active
Update pnlcomm on all operations and not just profit/loss locking
Correct comment for fillalpha and add baralpha for candlestick opacity
Merge PR 378 (doc typo) PR 378 (rollover for live feeds and tz use
in datetime utilities)
Use internal dict for data feed presence test and update trade observer
I'm having troubles with calculating the expected optimization memory usage.
I need it to split big parameters dict during optimization into chunks if memory usage is too high.
I came up with this function.
But it doesn't work always.
params - dict | with strategy parameters for the optimization
start, end - datetime | start and end of the ticker data
freq - str | ticker data freq (15Min, 1H, etc)
def memory_gen(params, start, end, freq, threads=8, log=False):
period_len = len(pd.PeriodIndex(freq=freq, start=start, end=end))
params_len = 1
for param in params:
if type(params[param]) == list:
if not params_len == 1:
params_len *= len(params[param])
elif params_len == 1 and len(params[param]) > 1:
params_len = len(params[param])
n = 20.0
memory = round((period_len * params_len) * n / 1000000 + 0.200 * threads, 2)
Many thanks for the explanation! It is now clear!
I'm realizing a multi symbol strategy can create a complex synchronization scenario. It is not enough to just copy a “single symbol” strategy, you need to pay attention to the many details and situations that can occur.
Thank you very much!