PREMIUM: FREE Divergence thinkscript

ShadowTrader Divergence thinkscript

ST Divergence thinkScript

  • Chart net differential between closing price & the 20 SMA
  • Definitive histogram depiction reflecting stretched pricing based on the 20 sma
  • Shows insight into when a change in trend may occur
  • Includes detailed instructions on how to insert and customize on your thinkorswim platform
  • See video below for how to insert and customize on your thinkorswim platform (easy!)

divergence-study

 

 

Your thinkscript is in the blue box below.  Watch the video at right for detailed instructions on how to install and customize the Divergence thinkScript on your thinkorswim platform

 
If you have any issues copying the code from the box below, ShadowTrader recommends trying it from a different browser.

If you cannot resolve your issue, please contact support@shadowtrader.net


Statement of Rights and Responsibilities and Non-distribution
This Statement of Rights and Responsibilities (“Statement,” “Terms,” or “SRR”) derives from ShadowTrader’s terms of service that governs our relationship with users and others who interact with ShadowTrader brands, products and services, which we call the ShadowTrader Services or “Services”. By using or accessing the ShadowTrader Services, you agree to this Statement, as updated from time to time in accordance with the ShadowTrader Terms and Conditions and Statement of Rights and Responsibilities. License of the ShadowTrader code: This work is copyrighted by ShadowTrader and all rights of this work under the license are reserved. Use of the ShadowTrader licensed code is for private use only and any other use are prohibited. By exercising any of the rights herein, you are accepting the terms of this license. You have a non-exclusive right to use or alter the ShadowTrader code. Use of this Work other than as provided for in this license is prohibited. Any redistribution is strictly prohibited and will be enforced.

#ShadowTrader.net – Divergence
#Thank you to Scott Gillam for coding this for ShadowTrader
#ShadowTrader (Copyright ShadowTrader), a division of ShadowTrader Technologies, LLC. 2017. All rights reserved. This ShadowTrader Script is for educational purposes only. ShadowTrader is not responsible for the use, functionality or the performance of this Script. This work is copyrighted by ShadowTrader and all rights of this work under the license are reserved. Use of the ShadowTrader licensed code is for private use only and any other use are prohibited. By exercising any of the rights herein, you are accepting the terms of this license. You have a non-exclusive right to use or alter the ShadowTrader code. Use of this ShadowTrader Script other than as provided for in this license is prohibited. Any redistribution is strictly prohibited and will be enforced.

declare lower;

input price = FundamentalType.CLOSE;
input aggregationPeriod = AggregationPeriod.DAY;
input length = 20;
input averageType = AverageType.SIMPLE;

def MovAvg = MovingAverage(averageType, Fundamental(price, period = aggregationPeriod), length);
def zero = 0;
def Diff = close – movavg;

plot mySpike = Diff;

mySpike.AssignValueColor(if Diff >= 0 then Color.UPTICK else Color.DOWNTICK);

mySpike.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);