Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Text on Execution

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

    Text on Execution

    Hello,

    I'm using the language reference to set up text messages via email that are meant to go out whenever the strategy executes a trade (in or out).

    I set up two share services: Email and Text.

    I've included this code into the strategy:

    Code:
    protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
    {
         Share("Text", orderId, new object[]{ "[email protected]", orderId });
    }
    My concern is that the example I used from the reference was for emails rather than email to text.

    Is this how you would do it for email to text? If not, what would be different?

    Edit:
    Including screenshot of an error I am getting in playback
    Attached Files
    Last edited by WalterSkinner; 08-11-2021, 06:20 AM.

    #2
    Hello WalterSkinner,

    Thanks for your post.

    I will assume that you have used the test function on both the share services and have successfully tested both e-mail and e-mail to test. If you haven't please go back to Tools>Options>General and verify both work as expected.

    The construct of the Share() would be the same for email or text.

    I would suggest reducing the Share() down to just the name of the share service and the message you want to share. Based on your example of "
    Share("Text", orderId, new object[]{ "[email protected]", orderId });" I will assume your email to text share service is called Text. An example would be Share("Text", "Your message here");

    Please test with that example and build from there.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X