How to get the max value of the nearest 5 bars .thanks

Created at 11 May 2020, 19:38
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!
LO

lordyy

Joined 24.03.2015

How to get the max value of the nearest 5 bars .thanks
11 May 2020, 19:38


Hi,

How to get the max value of nearest 5 bars .
I try   double stops = MarketData.GetBars(timeFrame).HighPrices.Max(5);  but this is wrong.


cTrader Automate
@lordyy
Replies

PanagiotisCharalampous
12 May 2020, 08:27

Hi lordyy,

Use Maximum() method.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous