CloseAlg

Syntax

bool CloseAlg(AlgId tAlg)

Parameters

tAlg. Moniker of opened indicators calculation algorithm instance.

Description

The CloseAlg operation closes indicators calculation algorithm instance.

Comments

To execute the operation, in the tAlg field specify the calculation algorithm instance moniker to be closed. The operation results in the logical True if the object was closed successfully.

Example

Below is the example of closing calculation algorithm instance. The request contains moniker of opened calculation algorithm instance. The response contains whether closing is successful.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CloseAlg xmlns="http://www.fsight.ru/PP.SOM.Som">
<tAlg xmlns="">
  <id>S1!M!S!C1</id>
  </tAlg>
  </CloseAlg>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <CloseAlgResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</CloseAlgResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CloseAlg" :
{
"tAlg" :
{
"id" : "S1!M!S!C1"
}
}
}

JSON response:

{
"CloseAlgResult" : "1"
}
public static bool CloseAlg(string moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tClose = new CloseAlg()
{
tAlg = new AlgId() { id = moniker }
};
//Close indicators calculation algorithm instance
var result = somClient.CloseAlg(tClose);
return result;
}

See also:

Working with Indicators Calculation Algorithm