说到具体操作,无限易的策略模板其实很友好。比如做日内突破的策略,可以用这个核心代码框架: ``` # 无限易Python策略示例 def handle_bar(ctx): close = ctx.close[-1] high = max(ctx.high[-20:]) # 20日最高价 if close > high and ctx.pos == 0: ctx.buy(close, 1) # 突破买入 elif close < ctx.low[-20:] and ctx.pos >0: ctx.sell(close, 1) # 止损卖出 ```