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

Sound alert on every 10 points.

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

    Sound alert on every 10 points.

    Hi. New trader on Ninjtrader 8.

    How would i go about making a simple indicator that gives a custom sound alert every 10 points on the Emini S&P 500 futures index.

    For example the last traded price is 2010 the indicator should give a sound alert. When price is 2020 the indicator should give the same sound alert. 2030,2040,2050..5310. Even when it touches 10,310 etc.

    Thank you.
    Last edited by 10828; 04-22-2016, 09:13 PM.

    #2
    Hello 10828,

    Thank you for writing in and welcome to the NinjaTrader Support Forum!

    You can use the modulus (%) operator: http://www.dotnetperls.com/modulo

    Using this operator, you can check if the close price is divisible by 10 or not. If it is, sound an alert.

    Example:
    Code:
    if (Close[0] % 10 == 0)
         Alert(.....);
    If you only want this to occur if the current close is greater than the previous:
    Code:
    if (Close[0] > Close[1] && Close[0] % 10 == 10)
         Alert(.....);
    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,403 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by Shai Samuel, 07-02-2022, 02:46 PM
    4 responses
    94 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by DJ888, Yesterday, 10:57 PM
    0 responses
    6 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    158 views
    0 likes
    Last Post loganjarosz123  
    Started by Belfortbucks, Yesterday, 09:29 PM
    0 responses
    8 views
    0 likes
    Last Post Belfortbucks  
    Working...
    X