Getting Bid/Ask/Mark Data On A Watchlist Column


Category:
0
0

I am making a custom watchlist column but having trouble referencing the bid, ask and mark data. I am using the code below but getting “NaN” returned for each symbol.

 

plot MarkPrice = close(priceType = priceType.MARK);
Marked as spam
Posted by (Questions: 5, Answers: 1)
Asked on October 21, 2020 7:31 am
131 views
0
Private answer

According to language reference for Thinkorswim those price types are not supported for custom watchlist columns:

https://tlc.thinkorswim.com/center/reference/thinkScript/Constants/PriceType/PriceType-MARK

I am certain we have already covered this in the Q&A Forum but it may be difficult to find using the search function.

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on October 21, 2020 8:33 am
0
I see. Thank you for the response. Do you know if there is any way possible to get the bid, ask or mark price in the watchlist format using thinkscript?
( at October 21, 2020 10:08 am)
0
Sorry but I would have certainly provided that information if I was aware of any way to work around this limitation in Thinkorswim. The only method I know of to display Bid/Ask/Mark prices in a watchlist gadget is by using the built-in columns provided within that tool. The example code you provided does not even work within the Option Chain on the Trade tab of Thinkorswim. I believe it only works for chart studies at this time. The only other method that would be expected to work is to call the price type direct. Such as plot bidPrice = Bid;. And if you test that you will find it also does not work for any custom quote columns anywhere on the platform.
( at October 21, 2020 12:12 pm)