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

Share IFTTT how to string values into the Share function

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

    Share IFTTT how to string values into the Share function

    I have successfully added the Share using IFTTT and it sends notification to my IFTTT app but just need some help with the format. Using this line in my strategy which is monitoring account info: Share(@"IFTTT", @"NinjaTrader - MAX Cash", @"Recorded at " ); So the only thing I get in the app is Ninja trader - MAX Cash not the rest of the message. The first value is suppose to be the servicename , that works then it says the message but its looking for 3 possible values in the message. IF anyone has got this to work please let me know how to format it.

    #2
    Looking at the Watchdog Alert on the ecosystem: I got the correct format: Share(@"IFTTT","","",new object[] { "NinjaTrader","MAX DrawDown Recorded at" +Time[0].ToString("HH:mm:ss"),"100500 exceeded"}); Hope this helps anybody else.

    Comment


      #3
      Hello set2win,

      Below is a link to Share() in the help guide.


      The arguments supplied are the serviceName, and the message to send. If you would like to set the To, and Subject fields, this can be passed as the object parameter as elements 0 and 1.
      Share(string serviceName, string message, object[] args)

      From the tips:
      2.For the default NinjaTrader share adapters, the "args" array represents the following:
      ▪Mail share service:
      •args[0] = A string representing the email "To" field,
      •args[1] = A string representing the email "Subject" field
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        is there any way I can push notification via IFTTT when the chart entered a trade (needed during auto trading)

        Comment


          #5
          Originally posted by alshihri View Post
          is there any way I can push notification via IFTTT when the chart entered a trade (needed during auto trading)
          Hello alshihri,

          Thank you for your question and welcome to the NinjaTrader forum community!

          The available share services from NinjaTrader may send either emails or text messages via email. There is no option in NinjaTrader for push notifications and you would need to reach out to IFTTT support for information to see if an email or text message alert could be displayed as a push notification via the app.

          Thank you for using NinjaTrader.
          Emily C.NinjaTrader Customer Service

          Comment


            #6
            Use OnExecutionUpdate

            private void OnExecutionUpdate(object sender, ExecutionEventArgs e)
            {

            string alertStringEntry = @""+ e.Execution.Instrument.FullName + " " + e.MarketPosition.ToString() + " at: " + e.Execution.Price + " at " + DateTime.Now;
            string alertStringExit = @""+ e.Execution.Instrument.FullName + " Exited " + " at: " + e.Execution.Price + " at " + DateTime.Now;

            if ( e.Execution.IsEntry && !e.Execution.IsExit && e.MarketPosition.ToString() == "Long" )
            {

            Share(@"IFTTT","ninjatrader","", new object[] { "TradeAlert", alertStringEntry , @""});
            }​

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by GLFX005, Today, 03:23 AM
            0 responses
            1 view
            0 likes
            Last Post GLFX005
            by GLFX005
             
            Started by XXtrader, Yesterday, 11:30 PM
            2 responses
            11 views
            0 likes
            Last Post XXtrader  
            Started by Waxavi, Today, 02:10 AM
            0 responses
            6 views
            0 likes
            Last Post Waxavi
            by Waxavi
             
            Started by TradeForge, Today, 02:09 AM
            0 responses
            14 views
            0 likes
            Last Post TradeForge  
            Started by Waxavi, Today, 02:00 AM
            0 responses
            3 views
            0 likes
            Last Post Waxavi
            by Waxavi
             
            Working...
            X