cis Market Depth Indicator For ThinkOrSwim

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

FIXED:
cis Market Depth Indicator For ThinkOrSwim
a1.png


corrected code:
Ruby:
# cisGGMarketDEPTH
# Corum Integrated Solutions Inc
# GreatGatsbyProTrader Solution Series (c) 2008
#
# Joshua Corum (c) 2008-2017
#
declare lower;
# CopyCode
input CANDLES=21;
input SOUND_ALERT=yes;
input MarketDepthValue=yes;
input PriceActionTarget=yes;
def price = close ;
# CorumIntegratedSolutions.com
plot MARKET=average (high[1]-low[1],CANDLES);
plot DEPTH=average (high[1]-low[1],3);
# thinkorswimTOOLKIT.com
MARKET.AssignValueColor (createcolor(255,55,22));
MARKET.SetPaintingStrategy (paintingstrategy.HISTOGRAM);
MARKET.SetLineWeight (1);
DEPTH.AssignValueColor (createcolor (255,155,55));
DEPTH.SetPaintingStrategy (paintingstrategy.HISTOGRAM);
DEPTH.SetLineWeight (2);
# youtube.com/user/cisTRADING
plot MAXdepth=highestall (MARKET);
MAXdepth.SetPaintingStrategy (paintingstrategy.DASHES);
MAXdepth.SetLineWeight (2);
MAXdepth.DefineColor (“maxSELL”, createcolor (22,55,255));
MAXdepth.DefineColor (“maxBUY”, color.GREEN);
MAXdepth.AssignValueColor (if hlc3<hl2[1] then MAXdepth.color (“maxSELL”) else MAXdepth.color (“maxBUY”));
plot MINdepth=lowestall (MARKET);
MINdepth.SetPaintingStrategy (paintingstrategy.DASHES);
MINdepth.SetLineWeight (2);
MINdepth.DefineColor (“minSELL”, createcolor (22,55,255));
MINdepth.DefineColor (“minBUY”, color.GREEN);
MINdepth.AssignValueColor (if hlc3<hl2[1] then MINdepth.color (“minSELL”) else MINdepth.color (“minBUY”));

# thinkscriptTHINKORSWIM.com
plot MarketDEPTH=((MARKET+DEPTH)/2);
MarketDEPTH.SetPaintingStrategy (paintingstrategy.LINE);
MarketDEPTH.SetLineWeight (1);
MarketDEPTH.AssignValueColor (if hlc3>hl2[1] then color.green else color.red);

def BUY=hlc3>hl2[1];
def SELL=hlc3<hl2[1];
def buySTOP=price-marketDEPTH;
def sellSTOP=price+marketDEPTH;
def marketBUY=hl2+marketDEPTH;
def marketSELL=hl2-marketDEPTH;
# Potential Range Of (PRO) TRADE
# GG_TrendSTOP: Trend Support / Stop Value w/ Color Coded Buy/Sell Signal
# GG_TARGET: Price to Market Exchange Level w/ Color Coded Buy/Sell Signal
AddLabel (MarketDepthValue, concat (“cisMarketDEPTH:”, MarketDEPTH), createcolor(255,155,55));
AddLabel (PriceActionTarget and BUY, concat (“GG_TrendSTOP:”, buySTOP), color.dark_GREEN);
AddLabel (PriceActionTarget and SELL, concat (“GG_TrendSTOP:”, sellSTOP), createcolor(22,55,255));
AddLabel (PriceActionTarget and BUY, concat (“GG_TARGET:”, MarketBUY), color.dark_GREEN);
AddLabel (PriceActionTarget and SELL, concat (“GG_TARGET:”, MarketSELL), createcolor(22,55,255));
alert (BUY and SOUND_ALERT, “UP”, alert.BAR, sound.BELL);
alert (SELL and SOUND_ALERT, “DN”, alert.BAR, sound.DING);

addcloud (DEPTH,MARKET,color.GRAY,color.DARK_GRAY);

# JoshuaCorum.com
# PasteCode
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
476 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top