Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

to create an NinjaTrader native alert promatically

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

    to create an NinjaTrader native alert promatically



    it's a long shot, but is it possible to programmatically create above native alert? that would save a lot of lines of custom triggering logic codes.

    #2
    You may find this is what you are looking for: https://ninjatrader.com/support/help.../nt8/alert.htm

    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    Comment


      #3
      Originally posted by jeronymite View Post
      You may find this is what you are looking for: https://ninjatrader.com/support/help.../nt8/alert.htm

      Thanks.
      thanks for the reply. but actually that's not what I'm looking for. I read it but that Alert() only displays alert message upon called.

      I was hoping to set up Ninjatrader native alert with triggering logic configured, so that I don't need to write this triggering logic myself.

      Comment


        #4
        Hello leontancfa,

        Thanks for your post.

        To create alerts programmatically in a custom NinjaScript, you would need to code the logic into your script that triggers the alert to fire and call the Alert() method.

        The Strategy Builder could be used to set up the condition(s) to trigger the alert and call the Alert() method. Then, you could click the 'View code' button to see the generated syntax.

        See the help guide documentation below for more information.

        Alert(): https://ninjatrader.com/support/help.../nt8/alert.htm
        Conditions: https://ninjatrader.com/support/help...on_builder.htm
        Actions: https://ninjatrader.com/support/help...t8/actions.htm

        Let us know if we may assist further.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          @NinjaTrader_BrandonH​:

          This is not a satisfying response as there is no reference at all on any object usable from c#.
          There is no place we can find sample on how to set an alert programmaticaly.

          There are no reference available on some objects used by the alerts. Condition for exampl, AlertConditionItem is another example.

          Comment


            #6
            Hello Philippe56140,

            The help guide provides a code example. Scroll to the bottom of the help guide page.

            Code:
            if(RSI(14, 3)[0] >= 20)
            Alert("myAlert", Priority.High, "Reached threshold", NinjaTrader.Core.Globals.InstallDir+@"\sounds\Aler t1.wav", 10, Brushes.Black, Brushes.Yellow);


            Where you have mentioned:
            There are no reference available on some objects used by the alerts.
            I don't quite understand what this means..

            Alerts have a string message that appears in the Alerts Log window, and can play a sound. When you say available objects, use ToString() on the object if you want to put text about the object in the message.
            Code:
            Alert("myAlert", Priority.High, [B]order.ToString()[/B], NinjaTrader.Core.Globals.InstallDir+@"\sounds\Aler t1.wav", 10, Brushes.Black, Brushes.Yellow);
            That I am aware of, AlertConditionItem is not an object type in NinjaScript.

            Note, programmatically means programmed with code in C#. There is also the Alerts window, if you want to set up alerts on a chart with a point and click interface.


            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cmoran13, Yesterday, 01:02 PM
            0 responses
            25 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            17 views
            0 likes
            Last Post PaulMohn  
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            160 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            95 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            148 views
            2 likes
            Last Post CaptainJack  
            Working...
            X