/// <summary> /// Action to be executd for calculating indicator /// </summary> /// <returns>for future usage. Must be ignored at this time.</returns> protected override bool TrueAction() { // Validate int iSize = _chartPanel._chartX.RecordCount; if (iSize == 0) { return(false); } // Get the data string paramStr0 = ParamStr(0); Field pSource = SeriesToField("Source", paramStr0, iSize); if (!EnsureField(pSource, paramStr0)) { return(false); } Navigator pNav = new Navigator(); Recordset pRS = new Recordset(); pRS.AddField(pSource); pNav.Recordset_ = pRS; // Calculate the indicator Oscillator ta = new Oscillator(); Recordset pInd = ta.PrimeNumberOscillator(pNav, pSource, FullName); // Output the indicator values Clear(); for (int n = 0; n < iSize; ++n) { AppendValue(DM.TS(n), pInd.Value(FullName, n + 1)); } return(_calculateResult = PostCalculate()); }