I have this code here that plots a vertical line whenever the tema and dema line cross. Is it possible to add the text to a specific price point, i.e where the lines cross? Thanks in advance!
input show_vertical_line = yes;
def obv = reference OnBalanceVolume();
##########TEMA##########
input priceT = close;
input lengthT = 50;
def ema1 = ExpAverage(priceT, lengthT);
def ema2 = ExpAverage(ema1, lengthT);
def ema3 = ExpAverage(ema2, lengthT);
plot TEMA = 3 * ema1 - 3 * ema2 + ema3;
TEMA.SetDefaultColor(GetColor(0));
########################################################################
##########DEMA##########
input priceD = close;
input lengthD = 50;
def emaPrice = ExpAverage(priceD, lengthD);
def emaEmaPrice = ExpAverage(emaPrice, lengthD);
plot DEMA = 2 * emaPrice - emaEmaPrice;
DEMA.SetDefaultColor(GetColor(1));
# Draw vertical line to indicate call and put signals
def Uptrend = TEMA crosses above DEMA;
def Downtrend = TEMA crosses below DEMA;
AddVerticalLine((Uptrend && show_vertical_line), "Calls only", Color.White, Curve.FIRM);
AddVerticalLine((Downtrend && show_vertical_line), "Puts only", Color.Dark_Red, Curve.FIRM);
########################################################################
input show_vertical_line = yes;
def obv = reference OnBalanceVolume();
##########TEMA##########
input priceT = close;
input lengthT = 50;
def ema1 = ExpAverage(priceT, lengthT);
def ema2 = ExpAverage(ema1, lengthT);
def ema3 = ExpAverage(ema2, lengthT);
plot TEMA = 3 * ema1 - 3 * ema2 + ema3;
TEMA.SetDefaultColor(GetColor(0));
########################################################################
##########DEMA##########
input priceD = close;
input lengthD = 50;
def emaPrice = ExpAverage(priceD, lengthD);
def emaEmaPrice = ExpAverage(emaPrice, lengthD);
plot DEMA = 2 * emaPrice - emaEmaPrice;
DEMA.SetDefaultColor(GetColor(1));
# Draw vertical line to indicate call and put signals
def Uptrend = TEMA crosses above DEMA;
def Downtrend = TEMA crosses below DEMA;
AddVerticalLine((Uptrend && show_vertical_line), "Calls only", Color.White, Curve.FIRM);
AddVerticalLine((Downtrend && show_vertical_line), "Puts only", Color.Dark_Red, Curve.FIRM);
########################################################################