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 DannyP96, 05-18-2026, 02:38 PM
      1 response
      77 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      131 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      79 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      242 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      330 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X