import BrGenetator问什么可以从vnpy_ctastrategy引入?不是应该从vnpy.trader.utility引入?试了都对?为啥
vnpy.trader.utility里有对BrGenetator类的定义,但vnpy_ctastrategy只有目录里面有个init.py文件,这个文件代码很短,里面代码没有对BrGenetato的定义啊??
里面的内容是这样的,有点看不懂,哪位帮忙解释一下,谢谢
from pathlib import Path
from typing import Type
import importlib_metadata
from vnpy.trader.app import BaseApp
from vnpy.trader.constant import Direction
from vnpy.trader.object import TickData, BarData, TradeData, OrderData
from vnpy.trader.utility import BarGenerator, ArrayManager
from .base import APP_NAME, StopOrder
from .engine import CtaEngine
from .template import CtaTemplate, CtaSignal, TargetPosTemplate
try:
version = importlib_metadata.version("vnpy_ctastrategy")
except importlib_metadata.PackageNotFoundError:
version = "dev"
class CtaStrategyApp(BaseApp):
""""""
app_name: str = APP_NAME
app_module: str = __module__
app_path: Path = Path(__file__).parent
display_name: str = "CTA策略"
engine_class: Type[CtaEngine] = CtaEngine
widget_name: str = "CtaManager"
icon_name: str = str(app_path.joinpath("ui", "cta.ico"))