Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to generate Alert Log entry since the provided brush used was unfrozen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to generate Alert Log entry since the provided brush used was unfrozen

    Getting this error from an entry-only strategy I created that hands off an ATM order.

    Had been working fine, but getting this error today.

    My alert code was taken from your ATM sample code:

    Code:
     NinjaTrader.NinjaScript.Alert.AlertCallback(NinjaTrader.Cbi.Instrument.GetInstrument("MES 09-20"),
    this, "LongEntryAlert", NinjaTrader.Core.Globals.Now, Priority.High, msg,
    NinjaTrader.Core.Globals.InstallDir + @"\sounds\Alert1.wav",
    new SolidColorBrush(Colors.Blue), new SolidColorBrush(Colors.White), 0);
    How do I resolve?

    #2
    Hello Wick Wrangler,

    This is because you are creating new SolidColorBrush's rather than using the static brush. You can just use Brushes.Blue and Brushes.White here.

    I see that this is in the help guide sample so I will forward that to be updated.

    Code:
    NinjaTrader.NinjaScript.Alert.AlertCallback(NinjaTrader.Cbi.Instrument.GetInstrument("MSFT"), this, "someId", NinjaTrader.Core.Globals.Now, Priority.High, "message", NinjaTrader.Core.Globals.InstallDir+@"\sounds\Alert1.wav", Brushes.Blue, Brushes.White, 0);

    I look forward to being of further assistance.

    Comment


      #3
      Great, thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      42 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      29 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      46 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X