Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SendMail Trigger

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

    SendMail Trigger

    Gday

    I'd like to trigger sending an email whenever the strategy Stop Loss is hit, using the SendMail function.

    I am struggling to find a straight forward way of coding the trigger.

    Any suggestion?

    Thanks

    #2
    Code:
    if (CrossBelow(Close, stopPrice, 1))
         SendMail(...);
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh

      appreciate your help but "stopPrice" doesn't get compiled. \error CS0103\

      have tried to do it under the OnBarUpdate and also OnOrderUpdate methods but it doesnt work in neither of them.

      also tried StopPrice with the S in hi-key as it appears in the NT doc, but no success. What am I missing?

      any suggestion?

      thanks

      Comment


        #4
        For sure. You need to fill it in with what your stop price is. That is just a place holder for you to put in whatever your stop is.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Duh!

          Thank you very much and have a nice weekend.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          144 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          71 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          125 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          79 views
          0 likes
          Last Post PaulMohn  
          Working...
          X