♥ 0 |
Hello Hahn, I hope all is well. The purpose of this thread is to propose how to create a thinkscipt code or condition wizard that pulls stocks on the daily chart that have atleast a 30cent price gap to the up or down side from the previous day.
A Gap, when it comes to investing, is a break between prices on a stock chart that occurs when the price of a stock makes a sharp move up or down with no trading occurring in between.
This scan will primary be run during the premarket session.
As of right now as you can see in the screenshot, I currently have code that displays all gaping stocks which is fine, but as you can see it also beings back stocks with very small gaps under 30 cent change plus or minus.
Best
Marked as spam
|
already been asked and solved, in more ways than one: https://www.hahn-tech.com/ans/help-making-pre-market-gap-scanner-more-efficient/
WOW such dedication , I will go and find the best one and contact you again if i still have any issues
The code provided in my answer on this post does exactly what you have requested.
https://www.hahn-tech.com/ans/help-making-pre-market-gap-scanner-more-efficient/
It even has a user input for the percent value you want to check for. It can check for gaps up as well as gaps down. I can’t imagine why the code in that post does not accomplish your stated goals. If you need something more complex than this then it’s time you started submitting your requests as custom projects subject to our rates and terms.
Okay, just to confirm, this is the code you are referring too below?
def percent_change = -5.00;
input marketClose = 1600;
def closeCounter = SecondsTillTime(marketClose);
def regSessEnd = closeCounter[-1] == 0;
rec priorDayClose = if regSessEnd then close else priorDayClose[1];
# comment out yest_closing_price and replace with priorDayClose
#def yest_closing_price = close[500];
def afterhours_percent_change = 100 * ((close – priorDayClose) / priorDayClose ) ;
# comment out scan for greater than and replace with scan for less than
#plot scan = afterhours_percent_change >= percent_change;
plot scan = afterhours_percent_change
Correct, except what you copied and pasted is incomplete. The last line in the code is this:
plot scan = afterhours_percent_change <= percent_change;
sorry, i hit the text limit. I will test the code this morning and check if the code detects gaps greater than 30 cent plus or minus then remove those scan results once the gap fills less than 30 cent