def update_setting(self, setting: dict):
    '\n        Update strategy parameter wtih value in setting dict.\n        '
    for name in self.parameters:
        if (name in setting):
            setattr(self, name, setting[name])
    (symbol, self.exchange) = extract_vt_symbol(self.vt_symbol)
    if (self.idx_symbol is None):
        self.idx_symbol = ((get_underlying_symbol(symbol).upper() + '99.') + self.exchange.value)
    if (self.vt_symbol != self.idx_symbol):
        self.write_log(f'指数合约:{self.idx_symbol}, 主力合约:{self.vt_symbol}')
    self.price_tick = self.cta_engine.get_price_tick(self.vt_symbol)
    self.symbol_size = self.cta_engine.get_size(self.vt_symbol)
    self.margin_rate = self.cta_engine.get_margin_rate(self.vt_symbol)
Update strategy parameter wtih value in setting dict.
def update_setting(self, setting: dict):
    '\n        \n        '
    for name in self.parameters:
        if (name in setting):
            setattr(self, name, setting[name])
    (symbol, self.exchange) = extract_vt_symbol(self.vt_symbol)
    if (self.idx_symbol is None):
        self.idx_symbol = ((get_underlying_symbol(symbol).upper() + '99.') + self.exchange.value)
    if (self.vt_symbol != self.idx_symbol):
        self.write_log(f'指数合约:{self.idx_symbol}, 主力合约:{self.vt_symbol}')
    self.price_tick = self.cta_engine.get_price_tick(self.vt_symbol)
    self.symbol_size = self.cta_engine.get_size(self.vt_symbol)
    self.margin_rate = self.cta_engine.get_margin_rate(self.vt_symbol)