The highest high of all times (or for a 10 years ets)

Created at 17 Sep 2018, 18:36
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!
alexander.n.fedorov's avatar

alexander.n.fedorov

Joined 02.01.2018

The highest high of all times (or for a 10 years ets)
17 Sep 2018, 18:36


Dear Panagiotis! 

How do I find the The highest high of all times (or for a 10 years, or 10 month ets) for the pair?

Regards, Alexander

 


@alexander.n.fedorov
Replies

ClickAlgo
17 Sep 2018, 19:45

Hi Alexander,

The answer is simple if you sketch it out on a piece of paper or a white-board, it just needs some logical thinking and it helps if you know the .NET libraries.

  1. Pick timeframe
  2. Look back from the previous candle (bar) to how far back you want to go using an iteration loop
  3. Get the Market Series High Value of the candle
  4. Store each value into a dynamic array
  5. Use the LINQ library to find the Max value of the array

Paul Hayes
Sales & Marketing
Emailcontact@clickalgo.com
Phone: (44) 203 289 6573
Websitehttps://clickalgo.com

Twitter | Facebook | Google+ | YouTube | Pinterest | LinkedIn


@ClickAlgo

alexander.n.fedorov
17 Sep 2018, 20:49

Thank you for you very clear answer, Paul

I used to do some programming in VBA for Excel.
If I had and array of data I could loop through the data. It would take some time and processor power if aray is big enoungh

At the same time I could you some standart Excel functions (like "Match" or "Index" for example) and they would work many times faster

As I am new to c# and especially it is virtually impossible to find a textbook for this API,  I was assumning, maybe there is a standart function.

But thank you  anyway!

Regards,

Sasha


@alexander.n.fedorov

alexander.n.fedorov
17 Sep 2018, 20:50

sorry for misprints . 

"

I coulds use...

"


@alexander.n.fedorov

ClickAlgo
18 Sep 2018, 14:58

I put a hyperlink on the MAX text on the previous post, but it is also below.

https://www.tutlane.com/tutorial/linq/linq-max-function-to-get-maximum-value-from-list


@ClickAlgo