♥ 0 |
Hi Pete. I’ve defined (5) moving averages with the lengths of 8, 13, 21, 34, and 55. I want to know when the distance between the uppermost and lowest moving average is <= 2% of the stock price. Since the moving averages will not always be aligned in order, I’m trying to figure out how I can get the highest and lowest values based on which of the 5 MA’s are on top, and which one is on the bottom. I know the “highest” and “lowest” functions only accept 2 arguments so I’m pretty sure that’s not the solution. I’ve tried “AbsValue” and “GetValue” but I have too many arguments. I’m still in thinkScript learning mode and I’m stuck. I hope I’m on the right track here. I would really appreciate your help on this. Thank you again! *File Attached
Marked as spam
|
Private answer
Try using Min() and Max(): https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Math---Trig/Min https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Math---Trig/Max That's all I have time for at the moment. More later if you need additional ideas. Marked as spam
|
Please log in to post questions.