NexusFi: Find Your Edge


Home Menu

 





ToS Think or Swim Charting 52 week high


Discussion in ThinkOrSwim

Updated
    1. trending_up 11,288 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

ToS Think or Swim Charting 52 week high

  #1 (permalink)
emack101
Boston, MA/USA
 
Posts: 1 since May 2015
Thanks Given: 3
Thanks Received: 0

Hi,

Anyone have a script for Think or Swim where you can input user defined settings to have the chart draw out a horizontal line for the 52 week high.


Thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #2 (permalink)
mobiusrts
pensacola florida
 
Posts: 7 since Jul 2014
Thanks Given: 0
Thanks Received: 8

This will plot a horizontal line across the entire chart at the 252 day (past year) high.

def a = Highest(high, 252);
def barNumber = barNumber();
def bar = if IsNaN(a)
then Double.NaN
else BarNumber();
def ThisBar = HighestAll(bar);
def Line = if bar == ThisBar
then a
else Double.NaN;
plot P = if ThisBar
then HighestAll(Line)
else Double.NaN;
P.SetStyle(Curve.Short_Dash);
P.SetLineWeight(1);
P.SetDefaultColor(CreateColor(75,250,150));

Reply With Quote
Thanked by:
  #3 (permalink)
oakley
Haifa Israel
 
Posts: 2 since May 2015
Thanks Given: 0
Thanks Received: 1



emack101 View Post
Hi,

Anyone have a script for Think or Swim where you can input user defined settings to have the chart draw out a horizontal line for the 52 week high.


Thanks

HI,
Here is my code
----------------------------------------------------------------------------------------------
input length = 52;

plot LowerBand = Lowest(low(period = "WEEK")[1], length);
plot UpperBand = Highest(high(period = "WEEK")[1], length);

UpperBand.SetStyle(Curve.LONG_DASH);
UpperBand.SetDefaultColor(Color.BLUE);
UpperBand.SetLineWeight(4);

LowerBand.SetStyle(Curve.LONG_DASH);
LowerBand.SetDefaultColor(CreateColor(170,0,192));
LowerBand.SetLineWeight(4);

----------------------------------------------------------------------------------------------

Reply With Quote
Thanked by:




Last Updated on May 21, 2015


© 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