Indicator to count price from cash session open

sasank

New member
Is there any indicator to count a stock price from cash open. Starting from 0 ignoring the premarket action.
Example : A stock opens at 157 which is already up 3 dollars from previous close. I'd like to have indicator which counts the open from 157 after cash session open ignoring the pre market action 3 dollars. If the price goes up 158 the indicator should show +1 dollar or -1 dollar if the price goes to 156
 

Pensar

Well-known member
VIP
@sasank Do you mean something like this?
Code:
def c = close(period = aggregationperiod.day);
def o = open(period = aggregationperiod.day);
def data = c - o;

addlabel(1,AsDollars(data),
         if c > o then color.green
         else if c == o then color.gray
         else color.red);
 

Similar threads

Top