graftonian 1,089 posts msg #154407 - Ignore graftonian |
10/22/2020 2:58:21 PM
All you coding geniuses, I need some help. I want to show all occurrences of "Trigger = 3", however, I'd like those stocks with the first occurence of "Trigger = 3" to be displayed first. I believe my problems lie in the last two sections of the code.
Please and Thanx, Graf
|
nibor100 1,043 posts msg #154409 - Ignore nibor100 |
10/22/2020 4:40:18 PM
The 2 simple lines I was adding to solve your issue apparently makes your filter too complex to run on my Advanced subscription, so I'll wait a bit and see if anyone else solves it before I start reconstructing your posted filter to make it less complex so I can add those 2 lines and have it run.
Ed S.
|
graftonian 1,089 posts msg #154411 - Ignore graftonian |
10/22/2020 5:43:40 PM
@Ed, I only have the $8.95 monthly subscription, and I've come this far; too far to turn back now.
Thanx, Graf
|
nibor100 1,043 posts msg #154415 - Ignore nibor100 |
10/23/2020 2:10:02 AM
@ graftonian,
Since you have a magical basic subscription that allows you to run filters that are too complex for any other basic subscribers to run, here are the 2 statements I would add for you to go ahead and try:
add column trigger 1 day ago
sort column 6 ascending
By the way, I just checked on another computer and the filter you posted in this thread actually requires the advanced subscription to run. So I am curious, did you ever try the advanced subscription and then go back to the basic?
Thanks,
Ed S.
|
graftonian 1,089 posts msg #154416 - Ignore graftonian |
10/23/2020 9:19:48 AM
@Ed
Thanx for the reply. I have tried the route you suggested to no avail. Also tried creating additional variables,
SF does not tolerate any time shifting of the trigger variable. I have also created additional nonsense code
after the problem area, and SF will run that, so sheer size is not the problem.
Thanx again,
Graf
|
xarlor 587 posts msg #154417 - Ignore xarlor |
10/23/2020 9:25:02 AM
It's weird. Any time I try to add a statement that contains "trigger 1 day ago" the filter breaks. As in it doesn't return any results. Take the line away and results come back.
I've tried the following:
trigger 1 day ago equals 0
add column trigger 1 day ago
count(trigger 1 day ago < 1,1) equals 1
They all break. Yours works nibor100?
|
graftonian 1,089 posts msg #154419 - Ignore graftonian |
10/23/2020 10:24:56 AM
@Xarlor
I appreciate your attempts to help on this problem.
Graf
|
graftonian 1,089 posts msg #154420 - Ignore graftonian |
10/23/2020 7:32:25 PM
Found another "glitch''
In the following code:
/*********HullMA cross count*****/
set{HullCrossCount, count(H10 above H50, 1)}
draw HullCrossCount
"H10 above H50" can be replaced by "H10 crossed above H50", however,
/******STC crossed 25 count******/
set{STCcrosscount, count(STC above 25, 1)}
draw STCcrosscount
"STC above 25" cannot be replaced with "STC crossed above 25"
|
nibor100 1,043 posts msg #154425 - Ignore nibor100 |
10/24/2020 7:36:10 PM
I don't have a working solution yet, as the centerpiece of the problem is how many levels of nesting are in the Schaff Trend Cycle (STC) portion of the filter. But I do enjoy a puzzle!
Seems like once past 10 levels of nest, complexity issues start to arise....
Ed S.
|
Mactheriverrat 3,157 posts msg #154426 - Ignore Mactheriverrat modified |
10/24/2020 11:30:36 PM
Let me throw a little code out here from my box of code's. Now this is just code to play with.
If you want to change anything , change ema(23) - ema(50) to different averages.
/*SCHAFF TREND CYCLE INDICATOR*/
set{var1, ema(23) - ema(50)}
set{highest, var1 20 day high}
set{lowest, var1 20 day low}
set{range, highest - lowest}
set{var2, var1 - lowest}
set{var3, var2 / range}
set{var4, var3 * 100}
set{stclong2350, cema(var4, 5)}
add column STClong2350
add column STClong2350 one day ago
add column STClong2350 two day ago
draw stclong2350 line at 80
draw stclong2350 line at 25
draw stclong2350 line at 20
draw stclong2350 line at 10
/*BUY WHEN STC CROSSES ABOVE 20 or 10 */
/*SHORT WHEN STC CROSSES BELOW 80*/
|