Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SendMail() Function

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

    SendMail() Function

    I would like to use the PriceAlert indicator to send me an email whenever the price selected has been hit. It appears that I can use the 'SendMail()' function to do this. Can you tell me where in the code to add this string?

    #2
    Hello,

    Thank you for your note.

    You would want to put the SendMail() function in the if() statement where the Alert() function is triggered.

    Code:
                if ((triggerOnGreaterThan && Input[0] >= price - (TickSize * 0.5)) || (!triggerOnGreaterThan && Input[0] <= price + (TickSize * 0.5)))
                {
                    triggered = true;
                    Alert(DateTime.Now.Millisecond.ToString(), Cbi.Priority.Medium, "Price level '" + price + "' hit!", Cbi.Core.InstallDir + @"\sounds\Alert4.wav", 0, Color.Yellow, Color.Black);
                }
    CameronNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    80 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    46 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    66 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X