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

Alert in Indicator or Market Analyzer?

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

    Alert in Indicator or Market Analyzer?

    I am trying to write some Alert for my Indicators. For example, RSI cross over overbought or oversold. Such basic alert are easily configurable in TradeStation or Multicharts. But I cannot find it in NinjaTrader.

    The first instinct is for me to program it in Indicator. Expose it to properties for some configuration such as alert sound, etc.

    However, I saw in forum many replies point to write the alert using another indicator, expose it to Market Analyzer for it to alert.

    Before I start programming, I would like to ask for advice which route should I take? I am new to NinjaTrader.

    #2
    Hello Kalim,
    Welcome to the forum and I am happy to assist you.

    You can easily code it as an indicator or you can also use the MA to do it.

    Please refer here to know how to create an alert via the Market Analyzer



    If you want to code an indicator then the below code demonstrates how to sound an alert if RSI crosses above 70.
    Code:
    if (CrossAbove(this.RSI(14,3), 70,1))
    {
    	Alert("Alert", Priority.High, "Rsi crossed above 70", "Alert1.wav", 10, Color.Blue, Color.White);
    }

    To learn NinjaScript please go through these help guide references first to get some basic knowledge.
    http://www.ninjatrader.com/support/h...g_concepts.htm
    http://www.ninjatrader.com/support/h...indicators.htm
    http://www.ninjatrader.com/support/h...strategies.htm

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks for your quick response.

      MA can do simple alert for indicator greater/less than, cross over/below. For more complex conditions, I think I will have to code it in indicator.

      I am looking for the alert of an indicator Turning Up or Turning Down. For example, ADX/DM turning up or turning down, MA turning up or turning down. Can this be done in MA? If not, is there a function/method I can call in coding, something like crossover/crossbelow?

      Comment


        #4
        Hello kalim,
        Yes, MA can only trigger simple conditions. For more advanced conditions you have to code your custom NinjaScript code.

        Unfortunately there are no native Turn up or Turn down functions. You have to custom code any such functions.

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Tim-c, Today, 03:54 AM
        0 responses
        3 views
        0 likes
        Last Post Tim-c
        by Tim-c
         
        Started by FrancisMorro, Today, 03:24 AM
        0 responses
        2 views
        0 likes
        Last Post FrancisMorro  
        Started by Segwin, 05-07-2018, 02:15 PM
        10 responses
        1,771 views
        0 likes
        Last Post Leafcutter  
        Started by Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        31 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        945 views
        0 likes
        Last Post spwizard  
        Working...
        X