styliten 314 posts msg #161758 - Ignore styliten modified |
4/2/2025 3:13:12 PM
As shown in the heading, is there any easy way to show:
2nd/3rd/4th/etc. lowest/highest close/ema(10)/etc., etc. within the last X number days?
i.e.,
set{var101, sum of (5 highest closes in the last 10 days) minus sum of (5 lowest closes in the last 10 days)}
|
xarlor 596 posts msg #161759 - Ignore xarlor |
4/3/2025 8:53:00 AM
We can do this when there are only three values. However, without arrays, I'm not sure this can be accomplished with SF's limited framework.
|
styliten 314 posts msg #161775 - Ignore styliten |
4/10/2025 1:46:38 PM
@ xarlor
Didn't want to accept this verdict, but thanks for the confirmation nonetheless!
|
TheRumpledOne 6,525 posts msg #161776 - Ignore TheRumpledOne modified |
4/10/2025 6:17:20 PM
@styliten
What are you trying to accomplish? I am not asking about the math.
|
TheRumpledOne 6,525 posts msg #161777 - Ignore TheRumpledOne modified |
4/10/2025 6:27:57 PM
A little closer.
|
xarlor 596 posts msg #161781 - Ignore xarlor |
4/14/2025 10:10:46 AM
@TRO, I believe what styliten is asking is take the last 10 values of a given indicator, e.g. close, and rank them from lowest to highest, or vice versa.
So say we have an array of the closing prices:
Today: 100
1 day ago: 98
2 days ago: 95
3 days ago: 105
4 days ago: 90
5 days ago: 94
6 days ago: 93
7 days ago: 101
8 days ago: 102
9 days ago: 99
He wants to know the highest, 2nd highest, 3rd highest, all the way to lowest. So he would like the order to be:
105, 102, 101, 100, 99, 98, 95, 94, 93, 90
and be able to call back any position in the array.
We can get highest and lowest with SF commands, but not anything in between without arrays.
|
TheRumpledOne 6,525 posts msg #161782 - Ignore TheRumpledOne |
4/14/2025 11:55:17 AM
Understood.
But that's only a step or process to what they want.
I am asking, "What do they want?"
|
nibor100 1,081 posts msg #161783 - Ignore nibor100 |
4/14/2025 2:03:41 PM
I’m also curious about what Styliten wants to accomplish after subtracting the lowest 5 closes from the sum of the highest 5 closes?
105, 102, 101, 100, 99, 98, 95, 94, 93, 90 From Xarlor’s example, 507 minus 470 leaves him with 37, then what???
Ed S
|
nibor100 1,081 posts msg #161797 - Ignore nibor100 |
4/17/2025 3:24:26 PM
Expanding on Xarlor's approach I have come up with a way to get 4 in a row, which may be expandable to more in a row using some of the ideas in it.
Also at the end of my filter I added a section that shifts Xarlors 1st,2nd,3rd 3 days in the future to get a 2nd set of 3 in row, might be worth playing around with that approach.
Ed S.
|