Created
October 3, 2013 13:24
-
-
Save wesyoung/6809776 to your computer and use it in GitHub Desktop.
tos-price-percentile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shah H. Development 2013 | |
input length = 10; | |
input price = close; | |
input pricePercentUP = 5.0; | |
input pricePercentDOWN = -5.0; | |
def PercentChg = Round(100 * (price / price[length] - 1), 2); | |
AddLabel(1, Concat ("% Price Chng:", PercentChg ),if percentChg >= pricePercentUP then color.dark_green else if percentChg <= pricePercentDOWN then color.red else color.gray); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment