From 02dea2aeb619cb2cb91a52d8f95522107d07a48c Mon Sep 17 00:00:00 2001 From: bxdd Date: Wed, 27 Jan 2021 07:42:00 +0000 Subject: [PATCH] update paused --- examples/high_freq/highfreq_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/high_freq/highfreq_handler.py b/examples/high_freq/highfreq_handler.py index 264851031..298ffb5c0 100644 --- a/examples/high_freq/highfreq_handler.py +++ b/examples/high_freq/highfreq_handler.py @@ -55,7 +55,7 @@ class HighFreqHandler(DataHandlerLP): names = [] template_if = "If(IsNull({1}), {0}, {1})" - template_paused = "Select(Eq($paused, 0.0), {0})" + template_paused = "Select(Or(IsNull($paused), Eq($paused, 0.0)), {0})" # template_paused="{0}" template_fillnan = "FFillNan({0})" simpson_vwap = "($open + 2*$high + 2*$low + $close)/6" @@ -196,7 +196,7 @@ class HighFreqBacktestHandler(DataHandler): names = [] template_if = "If(IsNull({1}), {0}, {1})" - template_paused = "Select(Eq($paused, 0.0), {0})" + template_paused = "Select(Or(IsNull($paused), Eq($paused, 0.0)), {0})" # template_paused="{0}" template_fillnan = "FFillNan({0})" simpson_vwap = "($open + 2*$high + 2*$low + $close)/6"