i am building a momentum indicator. it is simple
close - close(from any number of bars ago) = momentum line.
i would like to be able to selct the number of bars on a scanner for any time frame.
also i would like to have a vertical line drawn on the chart when it crosses above and below zero line with different colors for each here is what i have so far i am getting stuck on the vertical bar part.
any input on what i am missing on the how to write this would be appreciated i amy trying to learn more about the syntax
##LOL TIK TOK
declare lower;
def zeroline = 0;
def vm = close from 10bars ago;
def x = close - vm;
plot myline = x;
plot data = zeroline;
close - close(from any number of bars ago) = momentum line.
i would like to be able to selct the number of bars on a scanner for any time frame.
also i would like to have a vertical line drawn on the chart when it crosses above and below zero line with different colors for each here is what i have so far i am getting stuck on the vertical bar part.
any input on what i am missing on the how to write this would be appreciated i amy trying to learn more about the syntax
##LOL TIK TOK
declare lower;
def zeroline = 0;
def vm = close from 10bars ago;
def x = close - vm;
plot myline = x;
plot data = zeroline;