• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Need help adding arrows to price trend

RegularRob

New member
VIP
Can anyone help me add arrows to the price trend candlesticks?

Code:
declare lower;

input length = 7;
input signalLength = 10;
input averageType = AverageType.EXPONENTIAL;
input showBreakoutSignals = yes;

def obv = reference OnBalanceVolume();

plot OBVM = MovingAverage(averageType, obv, length);
plot Signal = MovingAverage(averageType, OBVM, signalLength);

plot UpSignal = if obvm crosses above signal then signal else Double.NaN;
plot DownSignal = if obvm crosses below signal then signal else Double.NaN;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);

Signal.SetDefaultColor(GetColor(2));

OBVM.SetDefaultColor(GetColor(5));
OBVM.SetPaintingStrategy(PaintingStrategy.line);
OBVM.SetLineWeight(3);
OBVM.DefineColor("Positive and Up", Color.GREEN);
OBVM.DefineColor("Positive and Down", Color.DARK_GREEN);
OBVM.DefineColor("Negative and Down", Color.RED);
OBVM.DefineColor("Negative and Up", Color.DARK_RED);
OBVM.AssignValueColor(if OBVM >= 0 then if OBVM > OBVM[1] then OBVM.Color("Positive and Up") else OBVM.Color("Positive and Down") else if OBVM < OBVM[1] then OBVM.Color("Negative and Down") else OBVM.Color("Negative and Up"));
 

Similar threads

Top