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!
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
NinjaTrader
Share IFTTT how to string values into the Share function
Collapse
X
-
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.Tags: None
-
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" fieldChelsea B.NinjaTrader Customer Service
- Likes 1
Comment
-
Originally posted by alshihri View Postis there any way I can push notification via IFTTT when the chart entered a trade (needed during auto trading)
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
-
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
by GLFX005
Today, 03:23 AM
|
||
Started by XXtrader, Yesterday, 11:30 PM
|
2 responses
11 views
0 likes
|
Last Post
by XXtrader
Today, 03:07 AM
|
||
Started by Waxavi, Today, 02:10 AM
|
0 responses
6 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
14 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
||
Started by Waxavi, Today, 02:00 AM
|
0 responses
3 views
0 likes
|
Last Post
by Waxavi
Today, 02:00 AM
|
Comment