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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    89 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X