Back

Indicator Resolution Minute, Updated each Tick

Hi,

I assume this is possible although I've read through the documentation and forum but can't find a concise answer.  Using EMA as an example can you point me in the right direction of how to set it to have a resolution of 14 minutes but for the indicator to be updated on each tick (the security in the algorithim would be set to to tick resolution).

Thanks!

Update Backtest








Please checkout the QuantConnect University example "Moving Average Cross".

In order to get minute EMA indicator updated with tick resolution data, we need to change the following lines in the Initialize method.

// request SPY data with tick resolution
AddSecurity(SecurityType.Equity, Symbol, Resolution.Tick);

// create a 15 minute exponential moving average
fast = EMA(Symbol, 15, Resolution.Minute);

// create a 30 minute exponential moving average
slow = EMA(Symbol, 30, Resolution.Minute);

Since we are now working with tick resolution the OnData event handler must have the following signature:

public void override OnData(Slice data)
{
//
}

// or

public void OnData(TradeBars data)
{
//
}

 

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed