Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 20:20:34 +0000



Post From: Last time price was seen

[2015-12-13 02:57:14]
cazeek - Posts: 33
Hello,

I need to perform calculations in my code based on the last time the security traded at the close price. So for example:

12/1: price range is 89 - 91
12/2 - 12/15: price always above 90
12/16: price closes at 90

On 12/16, I want to look back to find the last date that the price traded at 90 (12/1). Then I want to perform calculations on the subsection of sc.BaseDataIn from the dates 12/1-12/16.

In other words, I need the max(date) where the Low Price <= 90 before today, and I want to perform calculations on only the range of bars between then and today.

Would you be able to assist?

Thank you very much