Hello, I found this code to draw a line and have it move with the price variation in the open market
Price Line Indicator
but I have not had any luck trying to adapt it so that this same functionality is available during the pre-market in order to know the price movement before the opening.
I want to achieve this without showing "Extended-Hours Trading session" so that the moving averages are NOT affected
I tried something like this, for the premarket, but it doesn't work
Hope you can help
Warm Regards
Price Line Indicator
but I have not had any luck trying to adapt it so that this same functionality is available during the pre-market in order to know the price movement before the opening.
I want to achieve this without showing "Extended-Hours Trading session" so that the moving averages are NOT affected
I tried something like this, for the premarket, but it doesn't work
Code:
input tf = aggregationPeriod.TWO_MIN;
def null = close - close;
def condition = if SecondsFromTime(0430) < 0 && SecondsTillTime(0930) >0 then barnumber() else na;
def close_price = close(period=tf) + null;
#plot cp = if condition then close_price else double.nan;
plot cp = condition;
Hope you can help
Warm Regards