♥ 0 |
How do I make a column to show gap % in premarket ? It would be something like: (daily close- last price)/last price I try to use (close-last)/last, but it says ‘last’ is an invalid statement Saw this post: https://www.hahn-tech.com/ans/percent-change-comparing-previous-day-close-to-premarket/ But the code there use close price from the last intraday bar, I want to use close from the daily bar
Marked as spam
|
Private answer
It seems you are mistaken. But don't worry, this is a common mistake among users of Thinkorswim. I will explain....
First off, I will start by assuring you can be absolutely certain that the previous solution you linked to in your latest request is the correct, final and only solution available. Here is the link again in case one of our other viewers missed it in your question: https://www.hahn-tech.com/ans/percent-change-comparing-previous-day-close-to-premarket/ And for those who would like to include the background color of the watchlist column you can get that here: https://www.hahn-tech.com/ans/custom-dynamic-real-time-change-column/ Ok, now let's take this apart and explain everything so you understand why that is the only solution available. And more importantly, why it is also 100% correct.
So in summary. The only way to read the daily close AND include premarket data is to set the watchlist column to intraday time frame AND include extended hours session. The code must then read the daily close from the last bar of the previous day's regular session. During premarket session, the current price of the current active bar is always going to be accessed by the following type of statement:
And just to make sure nobody misses the most important detail of all... This requires that you set up your custom watchlist column exactly as described in sections 3-1 through 3-3. Marked as spam
|
Please log in to post questions.