Aroon Indicator Crossover Arrow?

  • Thread starter technicallydreaming
  • Start date
technicallydreaming

technicallydreaming

Member
Hi, I wanted to know if it is possible to plot arrows on the chart to indicate Aroon long/ short crossovers. When Cyan line crosses above Red, it is a long... and same way in reverse.

More info: Aroon

Code:
#
# TD Ameritrade IP Company, Inc. (c) 2007-2020
#

declare lower;

input length = 25;

Assert(length > 0, "'length' must be positive: " + length);

plot Up = (length - 1 - GetMaxValueOffset(high, length)) * 100.0 / (length - 1);
plot Down = (length - 1 - GetMinValueOffset(low, length)) * 100.0 / (length - 1);
plot OverBought = 70;
plot OverSold = 30;

Up.SetDefaultColor(GetColor(1));
Down.SetDefaultColor(GetColor(5));
OverBought.SetDefaultColor(GetColor(8));
OverSold.SetDefaultColor(GetColor(8));
 
BenTen

BenTen

Administrative
Staff
VIP
Add this to the bottom of your script:

Code:
def bullish = Up crosses above Down;
def beairsh = Up crosses below Down;

plot U_Arrow = if bullish then 0 else Double.NaN;
U_Arrow.SetDefaultColor(Color.orange);
U_Arrow.SetPaintingStrategy(PaintingStrategy.ARROW_UP);

plot D_Arrow = if beairsh then 100 else Double.NaN;
D_Arrow.SetDefaultColor(Color.red);
D_Arrow.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
 
technicallydreaming

technicallydreaming

Member
Thanks Ben. The up arrows did not plot at first but I replaced "0" with "100" Under the bullish line of U_Arrow" and it works perfect.
 
Thread starter Similar threads Forum Replies Date
S Looking for a MTF Aroon Questions 1
chewie76 Xtreme Vortex Bundle Indicator for ThinkorSwim Indicators 13
J Help with coloring the first bar of this indicator correctly... Questions 0
C What's the FisherTransform indicator? Questions 1
P Darvas Box Indicator Questions 5

Similar threads

Top