PriceType.MARK not returning the correct value

british43

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.

Code:
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 " ");
 

XeoNoX

Well-known member
VIP
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:

BenTen

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

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

geebeeaye

Member
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...

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

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

naughtycalvin

New member
Hi,

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

Top