Alert on strategy order filled
-
- Posts: 72
- Joined: 20 Apr 2014
- Has thanked: 9 times
- Been thanked: 8 times
Alert on strategy order filled
Can MultiCharts be configured to send an email alert when a strategy order is filled (similar to what TS does)? By filled I mean when the strategy engine reports a new fill (not necessarily a live fill with a broker).
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Alert on strategy order filled
Getting MC to send an email alertCan MultiCharts be configured to send an email alert when a strategy order is filled (similar to what TS does)? By filled I mean when the strategy engine reports a new fill (not necessarily a live fill with a broker).
viewtopic.php?f=5&t=9890
-
- Posts: 72
- Joined: 20 Apr 2014
- Has thanked: 9 times
- Been thanked: 8 times
Re: Alert on strategy order filled
So it seems you need to code this yourself in an indicator, this is not something MC can do on it's own like TS?
As an example, say my strategy is running 30 minute bars of ESH6, and the code says Buy At Stop Close * 1.02 (buy stop 2% above the last bar's close). Multicharts would trigger a stop order, but is there any way to have the alert sent when the 2% stop is hit?
Is there an OnOrderFilled event or something similar I can trap?
I tried testing this last night and was able to send test email alerts, but when I set up a simple system to buy at market then sell next bar at market and ran it on 1 minute bars I never got a trade filled alert. Do the alerts only go out if autotrading is enabled (I did not enable autotrading but I did enable email alerts)?
As an example, say my strategy is running 30 minute bars of ESH6, and the code says Buy At Stop Close * 1.02 (buy stop 2% above the last bar's close). Multicharts would trigger a stop order, but is there any way to have the alert sent when the 2% stop is hit?
Is there an OnOrderFilled event or something similar I can trap?
I tried testing this last night and was able to send test email alerts, but when I set up a simple system to buy at market then sell next bar at market and ran it on 1 minute bars I never got a trade filled alert. Do the alerts only go out if autotrading is enabled (I did not enable autotrading but I did enable email alerts)?
-
- Posts: 72
- Joined: 20 Apr 2014
- Has thanked: 9 times
- Been thanked: 8 times
Re: Alert on strategy order filled
I found this post:
viewtopic.php?f=1&t=48626
which gets me part way there. I can configure that to send an alert when the position changes -- but how do I configure it to only do that when a new bar comes in?
1. My understanding is that the alert will only be triggered on the last bar.
2. How do I determine in the script if the last bar is a new bar (from live data) or is just the last bar from historical data (say when I open the chart before market open)?
Any assistance is appreciated!
Dave
viewtopic.php?f=1&t=48626
which gets me part way there. I can configure that to send an alert when the position changes -- but how do I configure it to only do that when a new bar comes in?
1. My understanding is that the alert will only be triggered on the last bar.
2. How do I determine in the script if the last bar is a new bar (from live data) or is just the last bar from historical data (say when I open the chart before market open)?
Any assistance is appreciated!
Dave
-
- Posts: 72
- Joined: 20 Apr 2014
- Has thanked: 9 times
- Been thanked: 8 times
Re: Alert on strategy order filled
OK so I got alerts going and my custom SMTP host (based on C# code from the internet) is working perfectly, I can do what I want with the email alerts.
However, MC thinks the email send failed. The same SMTP server works fine with TS, how can I suppress the email alert error popups that pop up on the screen? Or is there some way to determine what it is MC doesn't like that my custom SMTP server? Is it not giving some response code it should be?
Thanks.
Dave
However, MC thinks the email send failed. The same SMTP server works fine with TS, how can I suppress the email alert error popups that pop up on the screen? Or is there some way to determine what it is MC doesn't like that my custom SMTP server? Is it not giving some response code it should be?
Thanks.
Dave
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Alert on strategy order filled
Alerts for a strategy can be configured in the same way as indicator alerts are set. There's a wiki page about that here: strategy alerts.(..) you need to configure an indicator to generate an alert (that can be an email), but you cannot do the same from a Strategy, isn't it?