performance to trough


I tried to have a script for the calc of the performance from any given point in time to the trough of the time period to date. So for example from beginning of March 2020 to the trough of March to date . I tried to print the closing price of the first trading day of March (where I still struggle a bit) divided by the trough (which already is handy available). Any hint or smooth, easy way to have it accomplished? thank you!



Thanks Thomas. The following will calculate the performance from the close of the first trading day in March (2nd) to the lowest low value over the last 20 days. Is that what you had in mind?

//Get starting value;
//Get 20 day low value;
//Calculate % change

In this example BA fell 69.2% from March 2nd to the low on March 18th: