What is the easiest way to get year high/low values?

Created at 18 Nov 2019, 17:34
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
SI

sifneosfx

Joined 22.10.2018

What is the easiest way to get year high/low values?
18 Nov 2019, 17:34


Thank you!


@sifneosfx
Replies

sifneosfx
18 Nov 2019, 18:18

RE:

Sorry for the stupif question :)

 

            MarketSeries monthly_series = MarketData.GetSeries(SymbolName, TimeFrame.Monthly);
            double monthly_high = monthly_series.High.Maximum(year_high_low_period_months);
            double monthly_low = monthly_series.Low.Minimum(year_high_low_period_months);

 


@sifneosfx