NexusFi: Find Your Edge


Home Menu

 





Percentage scan


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one Alcamo with 2 posts (1 thanks)
    2. looks_two Lysakat with 2 posts (0 thanks)
    3. looks_3 kareem40 with 1 posts (0 thanks)
    4. looks_4 Nube with 1 posts (1 thanks)
    1. trending_up 1,423 views
    2. thumb_up 2 thanks given
    3. group 30 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Percentage scan

  #1 (permalink)
Alcamo
san pedro ca. USA
 
Posts: 11 since May 2019
Thanks Given: 3
Thanks Received: 4

Can someone help me write a script in TOS for scanning stocks whose yesterday's range was greater than the range of last 5 days?
Thank you

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
Better Renko Gaps
The Elite Circle
 
  #2 (permalink)
Nube
Minneapolis Minnesota
 
Posts: 24 since Jul 2019
Thanks Given: 0
Thanks Received: 13


Alcamo View Post
Can someone help me write a script in TOS for scanning stocks whose yesterday's range was greater than the range of last 5 days?
Thank you

Save this as a study, reference that study in the scanner

 
Code
declare lower;
input length = 5;
plot Scan = TrueRange(high, close, low) > Highest(TrueRange(high, close, low)[1], length - 1);

Reply With Quote
Thanked by:
  #3 (permalink)
 
Lysakat's Avatar
 Lysakat 
Las Vegas NV USA
 
Experience: Beginner
Platform: TWS, TOS, Multicharts
Broker: IB
Trading: Stocks, ETFS,Options
Posts: 28 since Jul 2014
Thanks Given: 11
Thanks Received: 11


When I read the offered script:

declare lower;
input length = 5;
plot Scan = TrueRange(high, close, low) > Highest(TrueRange(high, close, low)[1], length - 1);

in English it reads,
create a plot (your choice of TOS types in a lower chart) displaying either '0' or '1' (false or true) if today's TrueRange is greater than any 'TR" of the 4 days before today. OR is today's 'TR" bigger than any of the 4 days before today.

Also remember today's range varies depending upon today's movement, highs may get higher and lows lower.

TOS defines "TR" is the greatest of the following:
the difference between the current high and the current low
the difference between the current high and the previous close
the difference between the previous close and the current low

To me, that is not what you said but it may be what you want.

If it is not what you want, then the script needs correction. 'TrueRange' is not range (difference between today’s high and low) but an often-used calculated value.

What I read from "stocks whose yesterday's range was greater than the range of last 5 days" is this:

Show me today if yesterday's range (the difference between high and low) is greater than the any of the 5 days before yesterday. That may also imply yesterday's range is greater than today's.

Additionally, TOS lets you display the results in ways that may be easier to read. For instance, because the offered script returns a boolean value, TOS could display an arrow, wedge, or point above or below your candlesticks, assuming you use candlesticks on the same chart.

Before any changes please be explicit in what you need so you get what you want.

You may already have it but please be sure as there may be money riding on it.

Hope this helps

Reply With Quote
  #4 (permalink)
 
kareem40's Avatar
 kareem40 
Dallas, TX
Legendary TradeTheBar
 
Experience: Intermediate
Platform: NT, TS
Broker: IB, Oanda
Trading: ES, MES, MNQ, MYM
Posts: 730 since May 2010
Thanks Given: 1,950
Thanks Received: 925

Hi @Alcamo

I curious, how are you trading off this scan?

Thanks
K

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
Alcamo
san pedro ca. USA
 
Posts: 11 since May 2019
Thanks Given: 3
Thanks Received: 4

Regarding the percentage scan, it is not really a scan, but just an indicator shown below qqq ( what i follow and trade).
It tells me the percentage increase from yesterday's close. In my case I start trading at 6:30 Am. The % increase tells me how aggressive i should be entering QQQ. Should I invest my normal amount (lets say $20000) or maybe 50% of it. Normally, if the difference is an increase of 1.5% or more from yesterdays close i am not going to trade the all $20000. unless some really really favorable news is in. even the, i reduce my stop.

The other scan that i asked for help on the highest five day range is not working yet. I am not a thinkorswim script writer. I have very little knowledge o the script language, so i dont know if i am not able to utilize or maybe there is a glich in the script.
I hope this helps. Thank you for contacting me
Tony

Reply With Quote
Thanked by:
  #6 (permalink)
 
Lysakat's Avatar
 Lysakat 
Las Vegas NV USA
 
Experience: Beginner
Platform: TWS, TOS, Multicharts
Broker: IB
Trading: Stocks, ETFS,Options
Posts: 28 since Jul 2014
Thanks Given: 11
Thanks Received: 11

I tried the offered script in TOS, it works. The question I posted is 'what do you need". The programming is relatively simple for me but what your requirements must be accurate for the script to show what you want.

Please review the descriptions I've already posted about the various differences. Then if you want/need I can correct the script to meet your requirements.

Reply With Quote




Last Updated on August 21, 2019


© 2024 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 - Privacy Policy - Downloads - Top
no new posts