redversa721 157 posts msg #155333 - Ignore redversa721 | 
1/16/2021 3:32:12 PM
  I would like to get the date within the last 60 days when the the price was the highest
 Here I am trying to find how many days in general in takes to hit the highest value
 
 So assume buy is on day 1 and highest within the next 60 days happens on day 3. I would like to know when this happened.
 
 set{Close_Val,close 60 days ago}
 set{Open_Val,open 59 days ago}
 set{High_Val,price 60 days high}
 set{Buy_Val,min(Close_Val,Open_Val)}
 set{Profit,High_Val - Buy_Val}
 set{PftP, Profit / Buy_Val}
 set{PftP1, PftP * 100}
 
 extension / Evolution of logic , for back testing purposes, suppose I want to exit at 5% and I know my buy Value
 
 So buy Value is $10 on Day 1 and I am looking at a 60 day window. How can I get the first date when the highest of a 60 day window hit 10.5. 
 
 
 
 
  |