Is there an article on Sigma()? I've seen it in Indicator.cs for calculating some of the logic. I am not 100% sure how to determine what sigma value my custom indicator is using when the logic passes through this code. I try to port my FSB indicators to my trading platform, sometimes the signals don't match for very small values like .2 pips. It could be rounding, but I'd like to fully understand the sigma value to include it to be sure. thanks !!

Sigma is the acceptable statistical error, used in FSB / FST for comparing number in double format.

For example let's take two numbers:
double a;
double b;

FSB says that a is greater than b when a > b + sigma.

Sigma takes its value from the Sigma() function in the Indicator.cs file;

``````        protected double Sigma()
{
int iSigmaMode = isSeparatedChart ?
Configs.SIGMA_MODE_SEPARATED_CHART : // Indicators plotted on its own chart (MACD, RSI, ADX, Momentum, ...)
Configs.SIGMA_MODE_MAIN_CHART;       // Indicators plotted on the main chart (MA, Bollinger Bands, Alligator, ...)

double dSigma;

switch (iSigmaMode)
{
case 0:
dSigma = 0;
break;
case 1:
dSigma = Data.InstrProperties.Point * 0.5;
break;
case 2:
dSigma = Data.InstrProperties.Point * 0.05;
break;
case 3:
dSigma = Data.InstrProperties.Point * 0.005;
break;
case 4:
dSigma = 0.00005;
break;
case 5:
dSigma = 0.000005;
break;
case 6:
dSigma = 0.0000005;
break;
case 7:
dSigma = 0.00000005;
break;
case 8:
dSigma = 0.000000005;
break;
default:
dSigma = 0;
break;
}

return dSigma;
}``````

The SigmaMode parameter is set in the config.xml file and it's constant value.

``````  <SIGMA_MODE_MAIN_CHART>1</SIGMA_MODE_MAIN_CHART>
<SIGMA_MODE_SEPARATED_CHART>5</SIGMA_MODE_SEPARATED_CHART>``````

Therefore, the Sigma for the indicators plotted on the main price chart is 0.5 *Point. The idea is that the indicators on the price charts are compared with the market price, so the comparing error must not be greater than 1 pip.

For the indicators plotted on a separated chart has sigma value of 0.000005.