CalcAlgResult CalcAlg(AlgId tAlg, ArgType tArg)
mon. Moniker of opened indicators calculation algorithm instance.
tArg. Operation execution parameters.
The CalcAlg operation calculates indicators calculation algorithm.
To execute the operation, in the tAlg field specify the calculation algorithm opened instance moniker, and in the tArg field specify empty value. The moniker can be obtained on executing the OpenAlg operation.
The operation results in the information about successful calculation or calculation errors and also the total calculation time and the total time spent on calculation.
Below is the example of calculating indicators calculation algorithm. The request contains opened calculation algorithm instance moniker. The response contains information about calculation results.
{
"CalcAlg" :
{
"tAlg" :
{
"id" : "S1!M!S!C1"
},
"tArg" : ""
}
}
{
"CalcAlgResult" :
{
"successMessage" : "Calculation was executed successfully",
"totalElapsedTime" : "6906"
}
}
public static CalcAlgResult CalcAlg(AlgId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tCalc = new CalcAlg()
{
tAlg = moniker,
tArg = new CalcAlgArg()
};
//Execute indicators calculation algorithm
var result = somClient.CalcAlg(tCalc);
return result;
}
See also: