Automatic Check of SA Mode

Questions about MultiCharts and user contributed studies.
Wally_AD
Posts: 47
Joined: 28 Jan 2014
Has thanked: 8 times
Been thanked: 7 times

Automatic Check of SA Mode

Postby Wally_AD » 05 Feb 2014

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.

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Automatic Check of SA Mode

Postby MAtricks » 05 Feb 2014

I'd love to know the answer to this

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Automatic Check of SA Mode

Postby TJ » 05 Feb 2014

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.
Look up

getappinfo

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Automatic Check of SA Mode

Postby MAtricks » 05 Feb 2014

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;


Return to “MultiCharts”