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

Need email alert to give name of instrument

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

    #16
    Whould you be mind just to add an email alert for the two conditions with the full instrument name,chart,and the time of alert?

    Comment


      #17
      Haya,

      Can i add a second condition for the email alert.something like thisthis is excerrpt from the "EmailPriceAlert"

      if(Close[0] == PriceLevel)
      {
      SendMail(fromEmail, toEmail, "Price Alert", "Price level was hit at: " + PriceLevel);

      Only this time i suppose it should look something like this:

      if (Volume[0] == HighVolume = Price Level?

      Comment


        #18
        Hello cachevery,

        Yes, you may just add a SendMail() method right after your Alert() method if your so that it will both send you and Alert inside of NinjaTrader and an email.

        In Programming you may add as much complexity as you would like so you may add several conditions if you like.

        Let us know if we can be of any further assistance.
        JCNinjaTrader Customer Service

        Comment


          #19
          Originally posted by NinjaTrader_JC View Post
          Hello cachevery,

          Yes, you may just add a SendMail() method right after your Alert() method if your so that it will both send you and Alert inside of NinjaTrader and an email.

          In Programming you may add as much complexity as you would like so you may add several conditions if you like.

          Let us know if we can be of any further assistance.
          Yes,i need two kind of alerts - audible and email,and i need in the email alert the time and the price af the alert at the moment it`s triggered.Cold anyone asssist me with that one,please?

          Comment


            #20
            Hello cachevery,

            I would be glad to try to assist you but I am not sure what assistance you are looking for. I cannot code it for you but I can help you out with it.

            So if you are looking for both an Audio Alert and a email sent there are two options that you have.

            1. Using both SendMail() and Alert() in the same condition like in my previous post.

            Code:
            if ( //some condition )
            {
                SendMail( //parameters);
                Alert( //alert parameters);
            }
            I did not put in in parameters as there are numerous examples on this thread.

            2. You may just use an Alert() and then setup the Mail Option inside of NinjaTrader send alert message to your email by going to Tools -> Options -> Misc tab. Here you may enter in a "Mail alert messages to" address.

            Note this option will require you to setup the Mail settings above.

            Here is a thread that has an example of the settings for the mail options.
            Below is a list of known e-mail settings and information demonstrating configuring e-mail alerts within NinjaTrader. Included are settings which have been tested with basic accounts. Please ensure that your settings are configured identically to those included, as some only use the beginning of the e-mail address and do not



            The only other thing that I can think of to add to this thread is when you are looking for the time that this happened the Time[0] will give you a time stamp of the bar but if you want your local PC Clock time you may use the "DateTime.Now" option to get this information.

            For example,
            Code:
            SendMail( "[email protected]", "[email protected]", "Subject Line", "Body text at local PC Clock time is "+DateTime.Now);
            Let me know if you have any further questions or if I can be of any assistance.
            JCNinjaTrader Customer Service

            Comment


              #21
              Originally posted by NinjaTrader_JC View Post
              Hello cachevery,

              I would be glad to try to assist you but I am not sure what assistance you are looking for. I cannot code it for you but I can help you out with it.

              So if you are looking for both an Audio Alert and a email sent there are two options that you have.

              1. Using both SendMail() and Alert() in the same condition like in my previous post.

              Code:
              if ( //some condition )
              {
                  SendMail( //parameters);
                  Alert( //alert parameters);
              }
              I did not put in in parameters as there are numerous examples on this thread.

              2. You may just use an Alert() and then setup the Mail Option inside of NinjaTrader send alert message to your email by going to Tools -> Options -> Misc tab. Here you may enter in a "Mail alert messages to" address.

              Note this option will require you to setup the Mail settings above.

              Here is a thread that has an example of the settings for the mail options.
              Below is a list of known e-mail settings and information demonstrating configuring e-mail alerts within NinjaTrader. Included are settings which have been tested with basic accounts. Please ensure that your settings are configured identically to those included, as some only use the beginning of the e-mail address and do not



              The only other thing that I can think of to add to this thread is when you are looking for the time that this happened the Time[0] will give you a time stamp of the bar but if you want your local PC Clock time you may use the "DateTime.Now" option to get this information.

              For example,
              Code:
              SendMail( "[email protected]", "[email protected]", "Subject Line", "Body text at local PC Clock time is "+DateTime.Now);
              Let me know if you have any further questions or if I can be of any assistance.
              Hi JC,

              not it look perfect with time of sendind message,it is now looks like this

              :""text" 20.03.2014 9:17:16,but i need to add the full name of the instrument and the price which was at the moment the alert was triggered.

              Comment


                #22
                How can i achieve something like this:

                ""20.03.2014 8:00:37 Selling the pair $EURUSD,current price 1.3825.""for e.g.?

                Can you assist?
                Last edited by cachevery; 03-19-2014, 04:09 PM.

                Comment


                  #23
                  Hello cachevery,

                  You may use the "Instrument.FullName" to get the full name of the instrument.



                  For the Price you may use the "Close[0]" for the current trading price for this.

                  Code:
                  SendMail( "[email protected]", "[email protected]", "Subject Line", "Instrument Name is "+Instrument.FullName+" Current trading price "+Close[0]);
                  JCNinjaTrader Customer Service

                  Comment


                    #24
                    Originally posted by NinjaTrader_JC View Post
                    Hello cachevery,

                    You may use the "Instrument.FullName" to get the full name of the instrument.



                    For the Price you may use the "Close[0]" for the current trading price for this.

                    Code:
                    SendMail( "[email protected]", "[email protected]", "Subject Line", "Instrument Name is "+Instrument.FullName+" Current trading price "+Close[0]);
                    HI JC,and thank you,

                    now Can yoy please suggest how to have it all in one line: instrument name,date,time,price?

                    Comment


                      #25
                      JC,what you suggest as the time is the BS.Are you really serious about support or you just fkn around with me?????/First,you gave the line which supposed to be deliver the date and time of the alert.It did deliver the date and time,but the time it was the date and time Jacquard Loom wasn`t even invented.Now tyou give me the line with the supposed time of alert and it delivers something like this: Instrument Name is FDAX 12-13 Current trading price 1001....1001 is the upper limit i set to trigger an alert but NOT the time of the alert!

                      Comment


                        #26
                        Originally posted by cachevery View Post
                        JC,what you suggest as the time is the BS.Are you really serious about support or you just fkn around with me?????/First,you gave the line which supposed to be deliver the date and time of the alert.It did deliver the date and time,but the time it was the date and time Jacquard Loom wasn`t even invented.Now tyou give me the line with the supposed time of alert and it delivers something like this: Instrument Name is FDAX 12-13 Current trading price 1001....1001 is the upper limit i set to trigger an alert but NOT the time of the alert!
                        Dude, no offense but you are way out of line with your expectations and your language. I can see your frustration and sympathize with how difficult things seem. These guys are here to help you with guidance, not to do it for you. You have to have some ability to read and comprehend C# which is what NinjaScript language is based on.

                        So i think you have two options at this point. 1) Hire someone to get done what you need, there are plenty of pros here that will do that. 2) Spend your time reading the Ninjascript help manual, review the many many examples of coding and if you are serious, learn to program in C#.

                        Good luck.

                        Comment


                          #27
                          Originally posted by Tasker-182 View Post
                          Dude, no offense but you are way out of line with your expectations and your language. I can see your frustration and sympathize with how difficult things seem. These guys are here to help you with guidance, not to do it for you. You have to have some ability to read and comprehend C# which is what NinjaScript language is based on.

                          So i think you have two options at this point. 1) Hire someone to get done what you need, there are plenty of pros here that will do that. 2) Spend your time reading the Ninjascript help manual, review the many many examples of coding and if you are serious, learn to program in C#.

                          Good luck.
                          I Apollogize for my language,but why then provide with the thing that the support guys knew beforehand it would a lot o fun!It probably woulda been easier to say that it wouldn`t be possible then waste my time and make a joke out of me.

                          Comment


                            #28
                            Originally posted by cachevery View Post
                            I Apollogize for my language,but why then provide with the thing that the support guys knew beforehand it would a lot o fun!It probably woulda been easier to say that it wouldn`t be possible then waste my time and make a joke out of me.
                            They really are trying to help and they don't know when someone asks a technical/programming question if that person that asks the question is knowledgeable in programming. In many cases I think most people are and they can be aided by simple references either to the manual section or programming example.

                            Comment


                              #29
                              Originally posted by Tasker-182 View Post
                              They really are trying to help and they don't know when someone asks a technical/programming question if that person that asks the question is knowledgeable in programming. In many cases I think most people are and they can be aided by simple references either to the manual section or programming example.
                              Maybe,but i`ve been asking for the same thing a couple of days in a row...

                              Comment


                                #30
                                Hello cachevery,

                                I believe all the pieces of the puzzle are here and just need to be put together to be able to accomplish what you want.

                                Let me try a different way to assist you further. Could you post the snippet of code that you are using and the exact output that you are getting so that I can try to help?
                                JCNinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Radano, 06-10-2021, 01:40 AM
                                19 responses
                                604 views
                                0 likes
                                Last Post Radano
                                by Radano
                                 
                                Started by KenneGaray, Today, 03:48 AM
                                0 responses
                                3 views
                                0 likes
                                Last Post KenneGaray  
                                Started by thanajo, 05-04-2021, 02:11 AM
                                4 responses
                                470 views
                                0 likes
                                Last Post tradingnasdaqprueba  
                                Started by aa731, Today, 02:54 AM
                                0 responses
                                5 views
                                0 likes
                                Last Post aa731
                                by aa731
                                 
                                Started by Christopher_R, Today, 12:29 AM
                                0 responses
                                11 views
                                0 likes
                                Last Post Christopher_R  
                                Working...
                                X