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 Hwop38, 05-04-2026, 07:02 PM
|
0 responses
160 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
307 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
244 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
348 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
178 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment