Figure out whether the price has been higher than Donchain TOP in the last 20 periods
Created at 16 May 2018, 11:38
Figure out whether the price has been higher than Donchain TOP in the last 20 periods
16 May 2018, 11:38
Hey guys
So if I want to check whether CCI has been higher than 300 in the last 20 periods I do this:
bool cci300_10 = _cci.Result.Maximum(10) >= 300;
...but what in case I would like to figure out whether the price has been higher than Donchain TOP in the last 20 periods?
bool dncTOP = MarketSeries.High.Maximum(20) >= _dnc50.Top.Last(0);
?
I'm not sure this code will work since it compares it with with the value of the last period...
Any ideas?