Is it possible to have an effect trigger the BracketRiskModel defined in the SetRiskManagement?  See the below algo example I typed up really quick. Theres a couple indicators.  The algo enters a trade when price closes above the 20 sma.  I want to trigger the SetRiskManagement model on that 2nd block when the SMA20 crosses the 50


from AlgorithmImports import *
from QuantConnect.Data.Market import TradeBar
from risk import BracketRiskModel

class RollingWindowAlgorithm(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2022,1,1)                                 #Set Start Date
        self.Tickers = ('SPY','QQQ')

        for symbol in self.tickers:
            self.AddEquity(symbol, Resolution.Hour).Symbol
            sma20 = self.SMA(symbol, 20, Resolution.Daily, Field.Close)
            sma50 = self.SMA(symbol, 50, Resolution.Daily, Field.Close)
            symbolData = SymbolData(symbol, sma20, sma50)
            self.symbolDataBySymbol[symbol] = symbolData

        self.up_value = 0.1
        self.down_value = 0.1
        self.SetRiskManagement(BracketRiskModel(self.down_value, self.up_value))

        self.Schedule.On(self.DateRules.EveryDay("SPY"), self.TimeRules.BeforeMarketClose("SPY", 10), self.TradeSignals)

    def OnData(self, data):

    def TradeSignals(self):
        if == False:

        for symbol, symbolData in self.symbolDataBySymbol.items():
            if not self.Portfolio[symbol].Invested and (self.Securities[symbol].Close  > symbolData.sma20.Current.Value):
                self.SetHoldings(symbol, .1, False, "Buy Signal")

        for symbol, symbolData in self.symbolDataBySymbol.items():
            if self.Portfolio[symbol].Invested and (symbolData.sma20.Current.Value > symbolData.sma50.Current.Value):
                #self.SetRiskManagement(BracketRiskModel(self.down_value, self.up_value)) to take effect now

class SymbolData:
    def __init__(self, symbol, sma20,sma50):
        self.Symbol = symbol
        self.sma20 = sma20
        self.sma50 = sma50



The file that is referenced is isnt important to the question, could just be the standard risk model. Something like: