Advice for: how to best/better reuse code chunks , volume percentage

S

Shoopi

New member
As an old programmer, I'm starting to accumulate a lot of code chunks and just need some advice on how to more efficiently organize it for reuse with ToS.

Sample Scan Image
This is a sample scan I might use for a short Rubber Band entry, looking for price direction to move against the 50SMA briefly and looking for Stochastic K hooks as a filter. This would check a 3 minute timeframe, and a 10 minute to confirm the same signals. I might have the exact same scan with a 5:15 and 10:30 then I might have those 3 all with long entry entries so that is 6 scans for rubber band and I could have 5 setups so I wind up re-using a ton of code.

Is there a way to save my raw code in a more usable verbage and reuse code more efficiently? Kind of like on a watchlist I have custom columns that say "trend" and I have it coded to say Up or Down with color. Can I get a "Trend with a dropdown saying "Up" or "Down".

Should I be saving simpler scans like checking the "%D stochastic" with just 2 parameters as a scan and then utilize the "Intersect with" feature or is there a better way to check multiple time frames?

I've seen seasoned programmers here that I hope to get some "life hacks" they might have come up with.

Lastly:
A lot of people use ATR to filter stocks that that may not not be profitable. I use an Average True Range Percent (ATRP) ((ATR("length" = 10 / Close) * 100) so that it filters in relation to relation to the price for obvious reasons. I want to do the same with volume. I often use an arbitrary "500,000" or "1 Million" but for something like /ES versus AYTU, that would do be no good. I've tried to find the equivilent for volume but I'm afraid I'm not using the correct terminology.

Thanks very much!
Ryan
 
Thread starter Similar threads Forum Replies Date
Townsend Debugging ThinkScript (advice) Tutorials 1
MBF Clarity and advice Questions 85
bmcgraw393 Best Indicator to pair with RSI Questions 2
T Best option swing trader set up Questions 4
A Best default thinkorswim indicators? Questions 2

Similar threads

Top