Here is the simple code to try out Stoch indicator and I got divide by 0 exception.

Stack trace is at the end of this code

namespace QuantConnect

{

/*

* QuantConnect University: Bollinger Bands Example:

*/

public class IndicatorSuiteAlgorithm : QCAlgorithm

{

string _symbol = "ACWI";

Stochastic _sto = null;

//Initialize the data and resolution you require for your strategy:

public override void Initialize()

{

//Initialize

SetStartDate(2015, 6, 1);

SetEndDate(DateTime.Now.Date.AddDays(-1));

SetCash(25000);

//Add as many securities as you like. All the data will be passed into the event handler:

AddSecurity(SecurityType.Equity, _symbol, Resolution.Minute);

_sto = STO(_symbol, 14, 1, 1, Resolution.Minute);

}

public void OnData(TradeBars data)

{

if (!_sto.IsReady) return;

Plot("STO", _sto);

}

}

}

=====================

at System.Decimal.op_Division (Decimal d1, Decimal d2) [0x00000] in :0

at QuantConnect.Indicators.Stochastic.ComputeFastStoch (Int32 period, QuantConnect.Data.Market.TradeBar input) [0x00000] in :0

at QuantConnect.Indicators.Stochastic+<>c__DisplayClass12.<.ctor>b__0 (QuantConnect.Data.Market.TradeBar input) [0x00000] in :0

at (wrapper delegate-invoke) System.Func`2:invoke_TResult_T (QuantConnect.Data.Market.TradeBar)

at QuantConnect.Indicators.FunctionalIndicator`1[QuantConnect.Data.Market.TradeBar].ComputeNextValue (QuantConnect.Data.Market.TradeBar input) [0x00000] in :0

at QuantConnect.Indicators.IndicatorBase`1[QuantConnect.Data.Market.TradeBar].Update (QuantConnect.Data.Market.TradeBar input) [0x00000] in :0

at QuantConnect.Indicators.Stochastic.ComputeNextValue (QuantConnect.Data.Market.TradeBar input) [0x00000] in :0

at QuantConnect.Indicators.IndicatorBase`1[QuantConnect.Data.Market.TradeBar].Update (QuantConnect.Data.Market.TradeBar input) [0x00000] in :0

at QuantConnect.Algorithm.QCAlgorithm+<>c__DisplayClass18`1[QuantConnect.Data.Market.TradeBar].b__17 (System.Object sender, QuantConnect.Data.BaseData consolidated) [0x00000] in :0

at QuantConnect.Data.Consolidators.DataConsolidator`1[QuantConnect.Data.Market.TradeBar].OnDataConsolidated (QuantConnect.Data.BaseData consolidated) [0x00000] in :0

at QuantConnect.Data.Consolidators.IdentityDataConsolidator`1[QuantConnect.Data.Market.TradeBar].Update (QuantConnect.Data.Market.TradeBar data) [0x00000] in :0

at QuantConnect.Data.Consolidators.DataConsolidator`1[QuantConnect.Data.Market.TradeBar].Update (QuantConnect.Data.BaseData data) [0x00000] in :0

at QuantConnect.Lean.Engine.AlgorithmManager.Run (QuantConnect.Packets.AlgorithmNodePacket job, IAlgorithm algorithm, IDataFeed feed, ITransactionHandler transactions, IResultHandler results, IRealTimeHandler realtime, CancellationToken token) [0x00000] in Lean.Engine.AlgorithmManager.Run (QuantConnect.Packets.AlgorithmNodePacket job, IAlgorithm algorithm, IDataFeed feed, ITransactionHandler transactions, IResultHandler results, IRealTimeHandler realtime, CancellationToken token) [0x00000] in :0