# Filter by Mark % change script

#### westsail5000

##### New member
hello everyone... I'm trying to make a script that can for example, filter any stocks that are at a minimum, above 5% mark change. this would be used for premarket to help narrow down results. I have a similar script that allows me to filter change from open. I'm sure that the mark % filter would be somewhat similar in coding I'm just not sure how to modify it correctly. Any help greatly appreciated. Here's the script for the Change from open.

Code:
``````input MinChangeFromOpen = 5; #Change from open, %
def ChangeFromOpen = AbsValue((close-open)/open*100);
plot Signal = ChangeFromOpen >= MinChangeFromOpen;``````

#### XeoNoX

##### Well-known member
VIP
define stocks that are at a minimum, above 5% mark change

the stock's what is at a minimum?
the stock's mark is 5% minimum from what?

to begin with you can use this:
def bidprice = open(priceType = PriceType.bid);
def mark = open(priceType = PriceType.mark);

plotting the rest is just basic math

#### westsail5000

##### New member
define stocks that are at a minimum, above 5% mark change

the stock's what is at a minimum?
the stock's mark is 5% minimum from what?

to begin with you can use this:
def bidprice = open(priceType = PriceType.bid);
def mark = open(priceType = PriceType.mark);

plotting the rest is just basic math
Thank u very much for your response if i was decent at coding im sure it would have been all i needed, but to be honest this coding is over my head. I havent done any sort of coding since the days of myspace lol. If its not to much trouble would you be able to write the code. I would gladly pay you for your time.

#### XeoNoX

##### Well-known member
VIP
the problem is with your theory cant be fully coded because you fail to
define stocks that are at a minimum, above 5% mark change

the stock's what is at a minimum?
the stock's mark is 5% minimum from what?
you are not defining the stocks minimum. so there is nothing anyone can code against. a coder cant return the value "stocks minimum"... what does that mean? or as you worded it... what is "stocks that are at a minimum"?

##### Well-known member
VIP
@westsail5000 The only way to get proficient at coding is to start just like the rest of us who are constantly asked to help with obtuse concepts had to... We try being patient with new members but you really need to know how the scripts you use work in order to be a successful trader... Perhaps this isn't the advice you wanted to hear, but it's the advice you needed to hear... Learning is an expectation here... Take the time to get started... After all, it's your money on the line...

#### westsail5000

##### New member
define stocks that are at a minimum, above 5% mark change

the stock's what is at a minimum?
the stock's mark is 5% minimum from what?

to begin with you can use this:
def bidprice = open(priceType = PriceType.bid);
def mark = open(priceType = PriceType.mark);

plotting the rest is just basic math
I did word that a little funny. Im looking for all stocks in premarket that are above 5% mark change. The same mark change that is built into Tos which I can add to a watchlist columb. That is the value that I am looking to be above 5%. I assume your trying to help me to code, and like they say teaching a man how to fish is much better than giving him a fish, but i feel that even for this basic code Im not proficient enough to put it together without a serious walk thru on how to code it. I do plan to learn how to write scripts, but when i do im going to invest serious time to learn it right. I figured pretty much everyone would be using this code and they could simply copy and paste it for me.

#### westsail5000

##### New member
@westsail5000 The only way to get proficient at coding is to start just like the rest of us who are constantly asked to help with obtuse concepts had to... We try being patient with new members but you really need to know how the scripts you use work in order to be a successful trader... Perhaps this isn't the advice you wanted to hear, but it's the advice you needed to hear... Learning is an expectation here... Take the time to get started... After all, it's your money on the line...
So uve never come on here and asked for help in anything??? Im sure if someone provided the code, dont u think that i would look at the code and in doing so learn what it was that i was missing. When you put gas in your vehicle do u first learn how to drill for oil, then refine it. Before u drive your car do u first learn all the wiring scematics, and understand how every little piece functions? When you make a phone call do u first understand how the microchips in your phone operate? Have you ever asked anyone for help with figuring out anything in your entire life? And i would understand if my question was regarding an "obtuse concept", but its not, its regarding a very basic scan that i assumed people already had written up which they could simply copy and paste for me. And like i said in the post above i do plan to learn scripting but i know its gonna take me a month just to learn the basics and i dont have the time right now.

Last edited:

#### Fluideng

##### New member
@westsail5000 %change is built into TOS scan setting.
Choose Stock, %Change minimum 5.

##### Well-known member
VIP
@westsail5000 No, I rarely ever ask for help... You're welcome to review every one of my posts and see how many help questions I've asked... I'm guessing three at most and only after exhaustively attempting to resolve the issues myself... I've been programming, in more languages than I'd care to count, since 1984 and still learn something new every day...

I've learned everything I do by doing, not by asking... I do all of my own repairs and maintenance... Today I was working on a new kitchen island, tended to an ice damming issue in the sunporch, did maintenance on my wood router and circular saw, kept the wood stove going to beat down the gas bill, did some IT research for a customer, plus who knows what else, and still found time to help out here in the forums... Tomorrow I might start making a set of stools for around the new kitchen island... If it wasn't so cold and the snow so deep, I'd be in the woods harvesting trees for next winter... I'm 60 and I'm still a doer, and can run circles around my two sons who are half my age...

#### XeoNoX

##### Well-known member
VIP
@westsail5000 ok it appears you are new to trading, because
"Im looking for all stocks in premarket that are above 5% mark change. "
doesnt make much sense, but @Fluideng just made me realize that you "probably" meant to do is what @Fluideng said.
Mark is normally the middle price, im not sure if scan will tell you the price of the mark at a certarin bar, however it will tell you the high, low, and the close.
So assuming you mean 5% above the pre-market close then you can do what fluideng suggested in post#8

#### westsail5000

##### New member
@westsail5000 ok it appears you are new to trading, because
"Im looking for all stocks in premarket that are above 5% mark change. "
doesnt make much sense, but @Fluideng just made me realize that you "probably" meant to do is what @Fluideng said.
Mark is normally the middle price, im not sure if scan will tell you the price of the mark at a certarin bar, however it will tell you the high, low, and the close.
So assuming you mean 5% above the pre-market close then you can do what fluideng suggested in post#8

Last edited:

##### Well-known member
VIP
@westsail5000 Yes, I've overhauled transmissions and repaired every part of cars from front bumper to back... I was a Chrysler line mechanic and nationwide troubleshooter for Chrysler dealerships... I won the NYS Chrysler Troublshooters Contest in 1978 with the only perfect score to date at that time... I would have won the national championship if I had taken my car through judging but it wasn't perfect so I wouldn't go through judging... I had to stand up at the awards dinner to be informed of that fact...

As for helping traders, I think I do that every day... I write more code than you know about and have since 1984... That was my reason for purchasing my first computer... I took it home and, even though I had never touched a computer before, I started writing stock market analysis software... Before that all I had use was teletype terminals... I used to write code for myself and a stock broker in the 90's and even had my own satellite dish for live stock quotes back then - before the internet... Now I've been a self-employed IT Tech and consultant since 1989... I've had a couple software forums over the years and even had my own open source Content Management System and support forum...

I was also an EMT and rescue lieutenant for my local volunteer fire department... And I was also a dispatcher for the city ambulance service after a broken back as passenger in a car accident forced my career change from the automotive industry...

So when it comes to helping, been there, done that... And still do it every single day...

Anything else you'd like to know...???

Last edited:

#### westsail5000

##### New member
@rad14733 well u didnt help me. u took the time to respond, and instead of using that time in a helpful manner u used that time to basicly try and put me down. And working for chrysler is one of those jobs that pays waaay more than it deserves. Chryslers are absolute junk, now and then. I dont think they have hardly ever put out a decent vehicle. But u sound like a nice guy non the less and i wish u well in your endevours. But ya know something. I feel that our system of government puts everyone into a position of servitute. Thats the way its dressed up, so they pay u well to work for some useless corporation like chrysler, so the banks and everyone make money selling junk chryslers to unsuspecting customers, but u dont care cuz ur making an hourly wage right? Look im gonna stop ranting, but honestly it seems like uve accumulating quite a bit of negative energy along the way in ur life, which is normal for people that have worked for corporations for years and years, Ive been self employed my entire life, and no i didnt make a ton of money, but at least i didnt accumulate all that negative energy which i see in sooooo many people now adays, but its funny cuz the more down and out people more on the fringes that dont slave away for some corporation dont have that negative energy and actually seem to be much happier people, at least in my experience. But people like u might have it all, and u have this facad of being this great server of mankind, but i bet the people closest (and most vulnerable to ur negative energy(ur kids for example) prolly get the brunt of ur negative energy, I bet u just pick on one of them, the most vulnerable, I can tell ur an energy sucker (prolly dont even know ur doing it) im sure u feed off one of ur kids and somehow justify it. But any ways good luck wish u well, Hoope i gave u enuf positive energy to last u a cuple of hours...

#### westsail5000

##### New member
@XeoNoX That looks to be exactly what i was looking for ill give it a try first thing in the morning. Ill let ya know how it works out! Thank u very very much!