• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

PriceType.MARK not returning the correct value


Hello, I'm trying to find mark prices lower than stock/option "LOW" price. I tried the code below but returning incorrect values. Not sure what I'm doing wrong. I tried it on different intraday timeframe and still not accurate. If compare it with the TOS mark price and they are not the same value. Please help.

input priceType = PriceType.MARK;
plot MarkPrice = close(priceType = priceType);
addlabel(yes, if markprice >= low then "YES" else if markprice =< low then "NO" else if markprice ==low then "EQUAL" else " ");


Well-known member
mark is typically the middle price of the bid/ask spread... you are attempting to find stocks mark's lower than low price with a middle quote, you will not be able to execute such a trade on TOS as the platform, quotes, and your internet connection and your physical reaction time will not be quick enough to capture the rare event, algos with super computing speed and faster internet connection will beat you to it, most likely the marketmaker themselves will gladly take the extra money. In short the MM or ECN (some brokers even) will gladly take the order before you get a chance...at best scenario for the unfortunate seller they will attempt to fill the error at the best price available..
Last edited:


@geebeeaye This is what I came up with. It passes the scanner's editor with no error but returns no matching result.

input priceType = PriceType.MARK;
def MarkPrice = close(priceType = priceType);
def PDC = close[1];
plot condition = MarkPrice > PDC;


Thank you. How about scanning for Mark % change > 0%? or Mark > Last

I also found this online... it returns results but all are not +Mark % change...

def MarketClosePrice = if getTime() crosses RegularTradingEnd(getYYYYMMDD()) then close else MarketClosePrice[1];

plot PreMarketScan = getTime() < RegularTradingStart(getYYYYMMDD()) and close(priceType = "LAST") > MarketClosePrice * 1.02;


New member

I wanted to add a column under the Quotes or Scan - Search results that will tell the difference between "LAST" price and the "MARK" price. How can this be done? Basically, I wanted to sort based on after hours or pre-market ups/downs of any stock.

Thanks in advance.


New member

On the option chain, I adjusted the "Spread" to "Vertical", but the "Mark" price quote doesn't display the midpoint between the bid and ask of the Vertical spreads, as it does in the "Single" configuration. Instead, the "Mark" price displays half of the difference between the Vertical's bid and ask prices.

Chain in "Single" spread mode: Mark Price = Midpoint of bid/ask (y)


Chain in "Vertical" spread mode: Mark Price = 1/2 difference of bid/ask (n)


I attempted to calculate what the actual midpoint of the vertical spreads would be in thinkscript
Logic: Ask - Mark = Midpoint


Results: "NaN" down the entire Quote Column



Similar threads