Is there a way to detect by means of software whether automatic trading has been enabled? It means whether SA mode is active?
For example by reading a log file or by using an EasyLanguage function or statement.
Automatic Check of SA Mode
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: Automatic Check of SA Mode
Look upIs there a way to detect by means of software whether automatic trading has been enabled? It means whether SA mode is active?
For example by reading a log file or by using an EasyLanguage function or statement.
getappinfo
Re: Automatic Check of SA Mode
https://www.multicharts.com/trading-sof ... GetAppInfo
Code: Select all
Using GetAppInfo to monitor an ATS
In the simplified example below, the GetAppInfo(aiStrategyAuto) is used to monitor the status of an Automated Trading Strategy. If the ATS is turned off, a sound alert is given.
// Example: using the GetAppInfo(aiStrategyAuto) to monitor for an Automated Trading
// Strategy that gets turned off.
Variables:
IntraBarPersist PrevATSStatus(0), // Holds the status of the ATS at the previous update
atsStatus(0); // Holds the current ATS status
if (LastBarOnChart_s = True) then begin
atsStatus = GetAppInfo(aiStrategyAuto);
// If the current ATS Status is different from the previous, and the previous
// status was ON, give an sound alert.
if (atsStatus <> PrevATSStatus) and (PrevATSStatus = 1) then begin
PlaySound("C:\Temp\atsTurnedOff.wav");
end;
PrevATSStatus = atsStatus;
RecalcLastBarAfter(15); // Update every 15 seconds, even if the data feed stops updating
end;