Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Alerts: Indicators as triggering condition

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

    Alerts: Indicators as triggering condition

    Hello, I been searching for this and I couldn't find it, so excuse me if this topic has been covered before.

    What I am trying to achieve is getting an alert when the value of an indicator (X) crosses above (for example) of indicator (Y)

    For example, get an alert when SMA 5 crosses above SMA 14.

    Is there any way I can set another indicator as the triggering value for an alert?

    Thanks a lot!

    #2
    Hello,

    Thank you for your forum post.

    Yes this is possible in NinjaScript. You would use an if statement for your condition then the Alert() function.

    if(Indicator Value is True and I want an Alert)
    {
    Alert();
    }



    Let me know if I can be of further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_Brett View Post
      Hello,

      Thank you for your forum post.

      Yes this is possible in NinjaScript. You would use an if statement for your condition then the Alert() function.

      if(Indicator Value is True and I want an Alert)
      {
      Alert();
      }



      Let me know if I can be of further assistance.
      Hello Bret, thanks for the reply. As I never created a ninjascript I am a little bit blind here.

      For the example I posted I would need to create a new indicator (which would have to calculate the cross) and set the alert function within the indicator as you indicated and then set the indicator in the Market Analyzer?

      Thanks again!

      Comment


        #4
        yakito, to get started with coding indicators in NinjaScript I can recommend those tutorials we have here - http://www.ninjatrader-support.com/H...verview18.html

        If you want to use this in the Market Analyzer, I suggest you create for example an indicator that plots a +1 for a CrossAboe and a -1 for a CrossBelow signal, then you can directly set alerts on those values from your custom indicator in the MA.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks a lot again, I will start with my first indicator right away.

          One more question only. As I understand the only way to trigger indicators alerts is if they are in use either in the Market Analyzer or in an opened chart, is that right or is it there any way to trigger an alert?

          Thanks again!

          Comment


            #6
            You're welcome yakito, for example NinjaScript strategies could trigger alerts as well.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by samish18, Yesterday, 08:31 AM
            4 responses
            14 views
            0 likes
            Last Post elirion
            by elirion
             
            Started by funk10101, Yesterday, 09:43 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by TheWhiteDragon, 01-21-2019, 12:44 PM
            5 responses
            551 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by rtwave, 04-12-2024, 09:30 AM
            5 responses
            37 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by funk10101, Today, 12:02 AM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X