Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Builder Actions - Share to Email Function
Collapse
X
-
Strategy Builder Actions - Share to Email Function
I have my share (email) setup, and I get my emails, but when I use it in the Strategy Builder, I can't seem to get a 'Subject:' line. The email I receive states (No Subject) even though I've added a subject (string). Is there an instructional guide for this specific use or is there a known issue? Thanks -
Hello Darkslide_Tom,
Thank you for your post.
Are you using Share() or SendMail()?
The Strategy Builder can only use the following overload for Share(), which does not allow you to specify a subject, only a message (which is the body of the email):
Share(string serviceName, string message, string screenshotPath)
If you wanted to specify a subject, you would need to unlock the code and use one of the following overloads:
Share(string serviceName, string message, object[] args)
Share(string serviceName, string message, string screenshotPath, object[] args)
From the Help Guide:
"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"
The Help Guide page also has sample code demonstrating.
Please let us know if you have any further questions.
-
Would I modify the existing: Share(@"Gmail", Convert.ToString(Alert), @"", new object[] {@"[email protected]", @"", @"@INSTRUMENT"}); OR would I create a separate line under this existing code (ex: Share("Gmail", "Test Message", new object[]{ "[email protected]", "Test Subject Line" })?
Comment
-
If you only want to send one email via Share() you would modify the existing line of code with the overload that allows you to specify the subject line.
Please note that this: Share("Gmail", "Test Message", new object[]{ "[email protected]", "Test Subject Line" })
is just sample code, and you would replace the parameters with your desired values (i.e. your shareservice, email, to email and subject).
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
55 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
37 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
17 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
19 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
49 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment