Using NT8 and Strategy Builder I put together a simple tool to identify the time when the highest high and the lowest low were set during a time window determined by the user (historical only).
User inputs are: Time_Start and Time_End.
Price reaching a new high assigns High[0] to a variable named Price_High.
Likewise, price reaching a new low assigns Low[0[ to a variable named Price_Low.
I need to capture only the date and time -- Times[0][0] value -- when the final Price_High was set during the time window (highest high).
Again likewise, I need to capture only the final -- Times[0][0] value -- when Price_Low was set during the time window (lowest low).
Using the Price_High example, the following Conditions, Actions (Print statement), the output window displays ALL occurrences, not just the last one.
Conditions
Times[Default input][0].TimeOfDay >= Time_Start.TimeOfDay
Times[Default input][0].TimeOfDay <= Time_Stop.TimeOfDay
High[0] > Price_High
Actions
Price_High = High[0]
Print(@"High: "(Convert.ToString(Times[0][0]));
OUTPUT
~
5/19/2023 8:30:00 AM
5/19/2023 8:35:00 AM
5/19/2023 8:38:00 AM
5/19/2023 8:39:00 AM
5/19/2023 8:43:00 AM
5/19/2023 8:55:00 AM << This is the only value required
What can be added to the Print statement string builder to either eliminate all but the final value OR specifically select the final value only?
I've looked for and tried various values without success.
Thanks

Comment