self.eventEngine.register ==> false . repalce with self.event_engine.register
but:
test: Trigger exception has stopped
Traceback (most recent call last):
File "E:\WARTER\python\python.v3_portable\App\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 576, in call_strategy_func
func()
File "E:\WARTER\python\python.v3_portable\App\lib\site-packages\vnpy\app\cta_strategy\strategies\atr_rsi_strategy.py", line 56, in on_init
print(self.balance)
AttributeError: 'AtrRsiStrategy' object has no attribute 'balance'
my strategy script :
from vnpy.app.cta_strategy import (
CtaTemplate,
StopOrder,
TickData,
BarData,
TradeData,
OrderData,
BarGenerator,
ArrayManager,
)
class AtrRsiStrategy(CtaTemplate):
""""""