NexusFi: Find Your Edge


Home Menu

 





Can you please help me to add


Discussion in ThinkOrSwim

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




 
Search this Thread

Can you please help me to add

  #1 (permalink)
 shirke 
California
 
Experience: None
Platform: thinkorswim
Trading: Emini ES
Posts: 18 since Apr 2018
Thanks Given: 5
Thanks Received: 2

Can you please help me to add middle -50 line in Williams Percent R in default TOS indicator

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #2 (permalink)
 
Skidboot's Avatar
 Skidboot 
Houston, TX
 
Posts: 202 since Dec 2010
Thanks Given: 203
Thanks Received: 299


shirke View Post
Can you please help me to add middle -50 line in Williams Percent R in default TOS indicator


declare lower;

input length = 10;
input overBought = -20;
input overSold = -80;
input _middle = -50;

def hh = Highest(high, length);
def ll = Lowest(low, length);
def result = if hh == ll then -100 else (hh - close) / (hh - ll) * (-100);

plot WR = if result > 0 then 0 else result;
WR.DefineColor("OverBought", GetColor(5));
WR.DefineColor("Normal", GetColor(9));
WR.DefineColor("OverSold", GetColor(1));
WR.AssignValueColor(if WR > OverBought then WR.color("OverBought") else if WR < Oversold then WR.color("OverSold") else WR.color("Normal"));

plot Over_Sold = overSold;
Over_Sold.SetDefaultColor(GetColor(3));

plot Over_Bought = overBought;
Over_Bought.SetDefaultColor(GetColor(3));

plot Middle = _middle;
Middle.SetDefaultColor(GetColor(3));

Reply With Quote
  #3 (permalink)
 shirke 
California
 
Experience: None
Platform: thinkorswim
Trading: Emini ES
Posts: 18 since Apr 2018
Thanks Given: 5
Thanks Received: 2


Thank you very much.

One last thing can you please make a up and down arrow in price chart when Williams Percent Line trigger the -50 line

Started this thread Reply With Quote
  #4 (permalink)
 dectrader0 
Philadelphia, PA
 
Experience: Intermediate
Platform: Ninja Trader
Posts: 2 since Jul 2010
Thanks Given: 7
Thanks Received: 3

# NOTE: Add this code to the upper / Price study area
#
# user request: Add Up/Down Arrow on crossover of Mid line (-50). Enhancements added 2018.04.28 02:33:00 UTC
# Added Alert on crossover
#

input _middle = -50;
input usealerts = 1;
def WR = reference WilliamsPercentR;

plot crossUp = Crosses(WR, _middle, CrossingDirection.ABOVE);
crossUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
crossUp.Setlineweight(5);
crossUp.SetDefaultColor(Color.WHITE);

plot crossDown = Crosses(WR, _middle, CrossingDirection.BELOW);
crossDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
crossDown.Setlineweight(5);
crossDown.SetDefaultColor(Color.WHITE);

alert(usealerts and crossUp, "Cross Up", Alert.Bar, Sound.Ring);
alert(usealerts and crossDown, "Cross Down", Alert.Bar, Sound.Ring);

# END CODE

Reply With Quote
Thanked by:
  #5 (permalink)
 shirke 
California
 
Experience: None
Platform: thinkorswim
Trading: Emini ES
Posts: 18 since Apr 2018
Thanks Given: 5
Thanks Received: 2

Thank you.

Started this thread Reply With Quote




Last Updated on April 27, 2018


© 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