Black Dog System Indicator for ThinkorSwim - Strategy

Why when I copy and paste the script and save it in studies or copy the link and go to open shared items and save it in studies it plots nothing on my chart ?
 

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

Can someone help I've been using Black Dog System On 5 min chart, however I never see the white black dog arrows. I don't know what's wrong
 
That was a modification made following a request from @hashy to display a label that shows the direction of the last BDog arrow? Details in the modification history in the study
Oh yes I see do I add this to the script that Ben originally posted or can I replace that script to add this label. Also I am not seeing a white black dog arrow
 
Oh yes I see do I add this to the script that Ben originally posted or can I replace that script to add this label. Also I am not seeing a white black dog arrow


@Billions You can either add my modifications to @BenTen originally posted study, or use post #82 which already has that functionality incorporated in. Either approach is fine. For more info, read the change log in that study. Was that not explicit enough? Regarding the White BlackDog arrow, if you load that study on a 5 minute chart of AMZN, you'll see the white arrows. Make sure you have your expansion space increased, I set mine to 22.
 
@Billions You can either add my modifications to @BenTen originally posted study, or use post #82 which already has that functionality incorporated in. Either approach is fine. For more info, read the change log in that study. Was that not explicit enough? Regarding the White BlackDog arrow, if you load that study on a 5 minute chart of AMZN, you'll see the white arrows. Make sure you have your expansion space increased, I set mine to 22.
This may sound dumb But where do I find the expansion area?
 
Since I had some free time earlier today I took a closer look at the WHITE arrows on the original study. I believe part of the confusion was that WHITE arrows were used for BOTH a BDog Cross Up as well as a BDog Cross Down situation. This might be the basis of some of the recent confusion that was caused. I have now updated the code to adjust the positioning of the cross up/down arrows and as well as modified the color schemes for signals.

BDog Cross Up - Green
BDog Cross Down - Pink

Here's version 1.2 of the study

Code:
#   Black Dogs & SESs---For 5 minute chart ONLY
#   NAMED BlackDog_SES_5min
#   Originally posted by BenTen
#   Modifications by tomsk, 1.17.2020

# V1.0 - 03.29.2019 - BenTen - Initial release of Black Dogs & SESs (5 Minute Aggregation) study
# V1.1 - 01.10.2020 - tomsk  - Added state transition engine and label that displays direction of last BDog signal
# V1.2 - 01.17.2020 - tomsk  - Adjusted positioning of arrows and updated color schemes for signals

#   Here, "Black Dogs" are WHITE for use on a dark background.

input Hprice = high;
input Lprice = low;
input price = close;
input Hlength = 50;
input Llength = 50;
input Hdisplace = 0;
input Ldisplace = 0;

def StateUp = 1;
def StateDn = 2;

#   High / Low Band for SES computations
#   EMA of HIGHS

plot HAvg = MovAvgExponential(Hprice[-Hdisplace], Hlength);
HAvg.SetLineWeight(5);
HAvg.SetStyle(Curve.FIRM);
HAvg.HideBubble();
HAvg.HideTitle();
HAvg.AssignValueColor(if HAvg > HAvg[1] then Color.YELLOW else if HAvg < HAvg[1] then Color.VIOLET else Color.YELLOW);

#   EMA of LOWS

plot LAvg = MovAvgExponential(Lprice[-Ldisplace], LLength);
LAvg.SetLineWeight(5);
LAvg.SetStyle(Curve.FIRM);
LAvg.HideBubble();
LAvg.HideTitle();
LAvg.AssignValueColor(if LAvg > LAvg[1] then Color.YELLOW else if LAvg < LAvg[1] then Color.VIOLET else Color.YELLOW);

#   Crosses for SES Arrows
#   SES = Standard Entry Signal

#   Cross above High Average
plot SESup = if price > HAvg AND price[1] < HAvg then low else Double.NaN;
SESup.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
SESup.SetLineWeight(3);
SESup.SetDefaultColor(Color.CYAN);
SESup.HideBubble();
SESup.HideTitle();

#   Cross below Low Average
Plot SESdn = if price < Lavg AND price[1] > LAvg then high else Double.NaN;
SESdn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
SESdn.SetLineWeight(3);
SESdn.SetDefaultColor(color.YELLOW);
SESdn.HideBubble();
SESdn.HideTitle();

#    Black Dog Arrows

#   Change Aggregation Period to 20 minutes
def agg = AggregationPeriod.TWENTY_MIN;
def data = close(period = agg);

#   2 EMAs of Black Dogs
def BDfastEMA = ExpAverage(data,20);
def BDslowEMA = ExpAverage(data,100);

#   Black Dog UP for EMA20 crossing ABOVE EMA100
def UpCross = BDfastEMA > BDslowEMA and BDfastEMA[1] < BDslowEMA;
plot BDup = if UpCross then low else Double.NaN;
BDup.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BDup.SetLineWeight(5);
BDup.SetDefaultColor(color.GREEN);
BDup.HideBubble();
BDup.HideTitle();

#   Black Dog DN for EMA20 crossing BELOW EMA100
def DnCross = BDfastEMA < BDslowEMA and BDfastEMA[1] > BDslowEMA;
plot BDdn = if DnCross then high else Double.NaN;
BDdn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
BDdn.SetLineWeight(5);
BDdn.SetDefaultColor(color.PINK);
BDdn.HideBubble();
BDdn.HideTitle();

#    State Transitions

def LastXState = if UpCross then StateUp 
                 else if DnCross then StateDn
                 else LastXState[1];

AddLabel(1, "Last Cross Direction = " + if LastXState == StateUp then "UP" else if LastXState == StateDn then "DOWN" else "NOP", 
    if LastXState == StateUp then Color.Green else if LastXState == StateDn then Color.Red else Color.Yellow);

#
# End Black Dogs & SESs---For 5 minute chart ONLY
 
Since I had some free time earlier today I took a closer look at the WHITE arrows on the original study. I believe part of the confusion was that WHITE arrows were used for BOTH a BDog Cross Up as well as a BDog Cross Down situation. This might be the basis of some of the recent confusion that was caused. I have now updated the code to adjust the positioning of the cross up/down arrows and as well as modified the color schemes for signals.

BDog Cross Up - Green
BDog Cross Down - Pink

Here's version 1.2 of the study

Code:
#   Black Dogs & SESs---For 5 minute chart ONLY
#   NAMED BlackDog_SES_5min
#   Originally posted by BenTen
#   Modifications by tomsk, 1.17.2020

# V1.0 - 03.29.2019 - BenTen - Initial release of Black Dogs & SESs (5 Minute Aggregation) study
# V1.1 - 01.10.2020 - tomsk  - Added state transition engine and label that displays direction of last BDog signal
# V1.2 - 01.17.2020 - tomsk  - Adjusted positioning of arrows and updated color schemes for signals

#   Here, "Black Dogs" are WHITE for use on a dark background.

input Hprice = high;
input Lprice = low;
input price = close;
input Hlength = 50;
input Llength = 50;
input Hdisplace = 0;
input Ldisplace = 0;

def StateUp = 1;
def StateDn = 2;

#   High / Low Band for SES computations
#   EMA of HIGHS

plot HAvg = MovAvgExponential(Hprice[-Hdisplace], Hlength);
HAvg.SetLineWeight(5);
HAvg.SetStyle(Curve.FIRM);
HAvg.HideBubble();
HAvg.HideTitle();
HAvg.AssignValueColor(if HAvg > HAvg[1] then Color.YELLOW else if HAvg < HAvg[1] then Color.VIOLET else Color.YELLOW);

#   EMA of LOWS

plot LAvg = MovAvgExponential(Lprice[-Ldisplace], LLength);
LAvg.SetLineWeight(5);
LAvg.SetStyle(Curve.FIRM);
LAvg.HideBubble();
LAvg.HideTitle();
LAvg.AssignValueColor(if LAvg > LAvg[1] then Color.YELLOW else if LAvg < LAvg[1] then Color.VIOLET else Color.YELLOW);

#   Crosses for SES Arrows
#   SES = Standard Entry Signal

#   Cross above High Average
plot SESup = if price > HAvg AND price[1] < HAvg then low else Double.NaN;
SESup.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
SESup.SetLineWeight(3);
SESup.SetDefaultColor(Color.CYAN);
SESup.HideBubble();
SESup.HideTitle();

#   Cross below Low Average
Plot SESdn = if price < Lavg AND price[1] > LAvg then high else Double.NaN;
SESdn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
SESdn.SetLineWeight(3);
SESdn.SetDefaultColor(color.YELLOW);
SESdn.HideBubble();
SESdn.HideTitle();

#    Black Dog Arrows

#   Change Aggregation Period to 20 minutes
def agg = AggregationPeriod.TWENTY_MIN;
def data = close(period = agg);

#   2 EMAs of Black Dogs
def BDfastEMA = ExpAverage(data,20);
def BDslowEMA = ExpAverage(data,100);

#   Black Dog UP for EMA20 crossing ABOVE EMA100
def UpCross = BDfastEMA > BDslowEMA and BDfastEMA[1] < BDslowEMA;
plot BDup = if UpCross then low else Double.NaN;
BDup.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BDup.SetLineWeight(5);
BDup.SetDefaultColor(color.GREEN);
BDup.HideBubble();
BDup.HideTitle();

#   Black Dog DN for EMA20 crossing BELOW EMA100
def DnCross = BDfastEMA < BDslowEMA and BDfastEMA[1] > BDslowEMA;
plot BDdn = if DnCross then high else Double.NaN;
BDdn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
BDdn.SetLineWeight(5);
BDdn.SetDefaultColor(color.PINK);
BDdn.HideBubble();
BDdn.HideTitle();

#    State Transitions

def LastXState = if UpCross then StateUp
                 else if DnCross then StateDn
                 else LastXState[1];

AddLabel(1, "Last Cross Direction = " + if LastXState == StateUp then "UP" else if LastXState == StateDn then "DOWN" else "NOP",
    if LastXState == StateUp then Color.Green else if LastXState == StateDn then Color.Red else Color.Yellow);

#
# End Black Dogs & SESs---For 5 minute chart ONLY
Great gonna load it up and see if I get a signal. I was seeing the yellow and purple lines and arrows but no white black dog let’s see if this script works better. I will keep you posted Thanks for the update I appreciate it.
 
umDQW3S.png
 
@Billions Best way to test is to create a fresh new chart and re-add the indicator. It seems from that screenshot you have multiple indicators that plot arrows. Sometimes other arrows may be in the way of the white arrows.

OR...

The white arrows have been changed to a different color. I think that's what happening here.
 
@Billions Best way to test is to create a fresh new chart and re-add the indicator. It seems from that screenshot you have multiple indicators that plot arrows. Sometimes other arrows may be in the way of the white arrows.

OR...

The white arrows have been changed to a different color. I think that's what happening here.
Gotcha will do Thank you
 
@BenTen Sorry to bother you can you send a picture of the chart showing the black dog white arrows. Its driving me crazy. Thanks
 
@Billions Didn't see any white arrows for today or yesterday, but it was there from a couple days ago. Very rare to spot.

M59ljzg.png
 
@Billions
Have you loaded up a 5m / 100day chart or something? You don't get the black dogs every day. Sometimes not for weeks at a time.
Another way to do it... add 20 and 100 EMAs on a 20 minutes chart. Find where they cross. Go to your 5m chart and that's where you should have a dog.
 

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
363 Online
Create Post

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