PriceType.MARK not returning the correct value


New member
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 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.

Similar threads