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

Add Alert to indicator

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

    Add Alert to indicator

    Hi All,

    I am looking to add an alert for this indicator when it prints either a signal or arrow for divergence. It only prints 4 things on the chart - signal for Buy/Sell, divergence for Buy/Sell I am looking to add an alert when any marker is printed on the chart, but I am unsure how to include it in the script. Best case - I get the selection option int he indicator window to choose my alert sound, but 'alert 1' at least would be great. I attached the script in the notepad. Looking for hopefully some minor help in editing this script. thank you!
    Attached Files

    #2
    Hello Austiner87,

    Thanks for your post.

    There is an alert method you can used, which will provide an alert message to the alerts window and optionally play a sound. The advantage of this is that you get a time stamp of the alert in the alerts log. Here is a link to the method in the help guide: https://ninjatrader.com/support/help...nt7/?alert.htm You can copy the example shown in the help guide and modify for your needs. I would suggest adding the example everywhere in the code that you see the Draw statements for the markers. You would want to change the text of the message to better represent what the alert is as well as perhaps change the sound file and colors as appropriate.

    If by alert you only mean to play a sound then you can use the PlaySound method for that: https://ninjatrader.com/support/help...?playsound.htm As before you can copy the example in the help guide and apply it in the same sections where the draw methods are.

    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mestor, 03-10-2023, 01:50 AM
    16 responses
    389 views
    0 likes
    Last Post z.franck  
    Started by rtwave, 04-12-2024, 09:30 AM
    4 responses
    31 views
    0 likes
    Last Post rtwave
    by rtwave
     
    Started by yertle, Yesterday, 08:38 AM
    7 responses
    29 views
    0 likes
    Last Post yertle
    by yertle
     
    Started by bmartz, 03-12-2024, 06:12 AM
    2 responses
    23 views
    0 likes
    Last Post bmartz
    by bmartz
     
    Started by funk10101, Today, 12:02 AM
    0 responses
    7 views
    0 likes
    Last Post funk10101  
    Working...
    X