NexusFi: Find Your Edge


Home Menu

 





Help with Scanner


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one ColoradoCliff with 1 posts (0 thanks)
    2. looks_two sgtrades19 with 1 posts (0 thanks)
    3. looks_3 JBottum with 1 posts (0 thanks)
    4. looks_4 Smiling trader with 1 posts (0 thanks)
    1. trending_up 1,841 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
sgtrades19
Naperville, IL
 
Posts: 4 since Jan 2021
Thanks Given: 1
Thanks Received: 1

Hi Everyone,

I recently came across a code which plots strong low points of a stock, in different time frames. I'm trying to make a scanner but not having any luck. Can anyone please help? Ideally, I'd like to find stocks that are 1-2% away from the low on the "Monthly" aggregation period. Please see code below:

#DailyCOHL_Lines

input aggregationPeriod = AggregationPeriod.MONTH;
input showOnlyLastPeriod = yes;

plot DailyLow = low(period = aggregationPeriod);

DailyLow.SetDefaultColor(Color.RED);
DailyLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot ystdLow = low(period = aggregationPeriod)[1];

ystdLow.SetDefaultColor(Color.RED);
ystdLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

Thank you so much!


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Beijing Summit Closes: Xi Pledges Hormuz Help -- $1.14B …
Prediction Markets & Event Contracts
US Prop Firms Race Inside the CFTC Perimeter -- Tradeify …
Funded Trading Evaluation Firms
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
Iran Forward Curve: June 30 at 56% vs June 15 at 28% -- …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
13 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
ColoradoCliff
Parker CO/USA
 
Posts: 22 since Jun 2017
Thanks Given: 0
Thanks Received: 5


sgtrades19 View Post
Hi Everyone,

I recently came across a code which plots strong low points of a stock, in different time frames. I'm trying to make a scanner but not having any luck. Can anyone please help? Ideally, I'd like to find stocks that are 1-2% away from the low on the "Monthly" aggregation period. Please see code below:

#DailyCOHL_Lines

input aggregationPeriod = AggregationPeriod.MONTH;
input showOnlyLastPeriod = yes;

plot DailyLow = low(period = aggregationPeriod);

DailyLow.SetDefaultColor(Color.RED);
DailyLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot ystdLow = low(period = aggregationPeriod)[1];

ystdLow.SetDefaultColor(Color.RED);
ystdLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

Thank you so much!

You actually need to modify this study and instead of plotting the monthly lows, plot whether the % between current price & last month's low is within your threshhold...then you can scan as you're basically looking for true/false conditions.

Here's the code you can use for a custom scan. Be sure to set the Timeframe for your study scan to Monthly and enter this for your custom code...

plot MonthlyLowPct = absValue(1-(close/ low[1]) < .02);


Reply With Quote
  #3 (permalink)
 JBottum 
Omaha + Nebraska/USA
 
Experience: Intermediate
Platform: TOS
Trading: ES
Posts: 8 since Jul 2018
Thanks Given: 1
Thanks Received: 6



sgtrades19 View Post
Hi Everyone,

I recently came across a code which plots strong low points of a stock, in different time frames. I'm trying to make a scanner but not having any luck. Can anyone please help? Ideally, I'd like to find stocks that are 1-2% away from the low on the "Monthly" aggregation period. Please see code below:

#DailyCOHL_Lines

input aggregationPeriod = AggregationPeriod.MONTH;
input showOnlyLastPeriod = yes;

plot DailyLow = low(period = aggregationPeriod);

DailyLow.SetDefaultColor(Color.RED);
DailyLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot ystdLow = low(period = aggregationPeriod)[1];

ystdLow.SetDefaultColor(Color.RED);
ystdLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

Thank you so much!

Unfortunately you can't scan for multiple aggregation periods within the same scan study code.
We can likely use some sort of indicator separately on the scan screen to get you what you need.
Add me via         if you'd like to work on this.


Reply With Quote




Last Updated on August 31, 2021


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts