How can I get the highest/lowest price of the past 10 hours of a forex security, say EURUSD?

I am trying to do this in C# but so far, no luck.

I tried to use Relative Strenght Index, but it does not work and I can't get any value from it when I tried to debug it to the console, it keeps coming up as zero.

        public override void Initialize()
        {
            //var _rsi = new RelativeStrengthIndex(10,MovingAverageType.Exponential);
            
            SetStartDate(_year, 1, 1);
            SetEndDate(_year, 12, 30);
            SetCash(_cashValue);
           
            AddForex(_symbol, Resolution.Minute);
            
            // initiating EMA            
            _rsi = RSI(_symbol,10,MovingAverageType.Simple,Resolution.Daily);

                                                       :

 Then, if I try to Debug it in OnData() function, such as:

Debug("OpenPrice: "+_rsi+" CurrentPrice: "+Math.Round(_currentPrice,5)+" "+Time);

 it does not show anything for OpenPrice... it only shows zero as the value.

 

Author