从 0600 到 0800 做空,代码现在每隔一小时做一次做空

Short from 0600 to 0800, code is now shorting every second hour

我正在尝试回测在上午 0600 点到 0800 点之间做空是否明智,但代码每隔一小时生成一次仓位:https://www.tradingview.com/x/rIyPT4tI/

我想知道是否有人知道如何将代码更改为仅在 0600 到 0800 之间做空?

strategy("Backtest 1 hour", overlay = true)

timeFilter = (year >= 2018) and (month >= 7)

Longcondition = time("0600") and timeFilter
if (Longcondition)
    strategy.entry("Short",strategy.short, qty = 10)

Closecondition = timeFilter and time("0800")
if (Closecondition)
    strategy.close_all()```
//@version=4
strategy("Backtest 1 hour", overlay = true, process_orders_on_close=true)

timeFilter = (year >= 2018) and (month >= 7)

Longcondition = time("", "0600-0601") and timeFilter
if (Longcondition)
    strategy.entry("Short",strategy.short, qty = 10)

Closecondition = timeFilter and time("", "0800-0801")
if (Closecondition)
    strategy.close_all()