Chart label for daily open colored based on premarket range


Category:
0
0

 

 

Hey Pete I need help creating a chart label with these conditions

 

  1. Calculate and displays stock Dailey open price as chart label

 

 

  1. Calculates Premarket range = (Premarket high+Yesterdays close)/2

 

If stock opens under premarket range= show open price label red

If stock opens above premarket range= show open price label green

 

Anything else show grey n/a

Marked as spam
Posted by (Questions: 3, Answers: 3)
Asked on November 20, 2020 11:03 pm
113 views
0
Private answer

I updated the title question to correct a typo and include important details about your request.

The solution to this is far more complicated than it first appears. There are many hoops the code must jump through in order to handle the transitions from regular session market to extended session market.

Further complicating the solution... By stating things the way you have: "Premarket range" and "Premarket high". You have intentionally excluded the first half of the extended hours session. The extended hours session consists of the time immediately following the regular session close up to the time of the next regular session open. It is common to refer to the first half of the extended hours session as "post market hours" or "after market hours". This is the portion of the extended trading session you have excluded when you requested this measure the "premarket range". The premarket session takes place from midnight Eastern up until the regular session open.

I was not able to complete this and work out all of the bugs within the brief 15 minutes I allow for free solutions in the Q&A forum.

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on November 21, 2020 8:53 am