cis Market Depth Indicator For ThinkOrSwim

MerryDay

Administrative
Staff member
Staff
VIP
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

Top