|
Lars Karlsson
2017-07-31 08:57:16
|
|
Hello,
I've been having some success with part time swing trading of a reversal type strategy, and would now like to refine my strategy in a time efficient manner in order to improve my win rate.
I want to screen (EOD) a couple of years worth of data for Nasdaq stocks that have increased +50% over a few days.
From this screen I want an output of all the stocks that meet this criteria and also for which date this is true for each of these symbols.
To this table I also want to add colums with customized parameters, such as e.g. performance one week after, candlestick criteria etc.
Could anyone perhaps point me in the right direction to accomplish this feat?
Is it possible to also include an intraday parameter in such as the slope of the first trading hour range midpoint through the last trading hour range midpoint?
Thank you in advance!
Lars
|
|
|
|
Amritendu Maji
2017-07-31 12:25:32
0
|
|
I think you can look at the following examples and see if these help you.
https://www.quantshare.com/how-429-how-to-create-a-screen
https://www.quantshare.com/how-311-how-to-screen-for-stocks-having-a-high-correlation-with-the-dow-jones-index
https://www.quantshare.com/how-266-difference-between-the-watchlist-and-the-screener-tools
https://www.quantshare.com/how-294-how-to-perform-a-basic-quantitative-analysis-using-the-s-p-500
I don't know much about intraday trading, so I will not venture there. Hope the above helps.
|
|
|
|
QuantShare
2017-08-01 07:45:20
0
|
|
Here is how to combine EOD and Intraday data:
https://www.quantshare.com/sa-363-day-trading-a-trading-system-that-combines-intraday-and-eod-data
|
|
|
|
Lars Karlsson
2017-08-01 07:50:56
0
|
|
Amazing, thank you for the rapid answers! I'll get right to it.
|
|
|
|
Lars Karlsson
2017-08-02 17:56:34
0
|
|
Regarding being able to find specific dates for when the criteria is true for different symbols, I found this forum thread: https://www.quantshare.com/title-242-screener
However, I'm not quite sure how I would be able to get the date for when the criteria is met over the course of a year, especially if the criteria are met on several different dates for the same symbol.
Maybe you could offer some help in this context?
|
|
|
|
QuantShare
2017-08-03 05:34:18
0
|
|
You need to calculate the number of bars since the criteria was true using "barssince" function then reference the past day, month, week values using "ref" and the value returned by "barssince".
|
|
|
|
Lars Karlsson
2017-08-03 07:29:01
0
|
|
How would I get barssince() to return more than one value per symbol? Thank you.
|
|
|
|
Amritendu Maji
2017-08-03 11:00:00
0
|
|
I think to get more than one instance, you will need to use this custom indicator.
https://www.quantshare.com/item-1631-barssince-with-support-for-nth-prior-or-future-occurrence
Thank you.
|
|
|
|
Lars Karlsson
2017-08-04 05:39:29
0
|
|
Great, thanks for your response Amritendu! However, I'm not able to download the trading object. What could be the issue?
|
|
|
|
Amritendu Maji
2017-08-04 22:22:37
0
|
|
I was also not able to download it. Maybe Admin can figure it out.
Thank you.
|
|
|
|
QuantShare
2017-08-05 06:11:07
0
|
|
It should work now.
|
|
|
|
Lars Karlsson
2017-08-07 00:39:21
0
|
|
Thank you again!
I also received this response from Quantshare:
"This function returns only the number of bars since the last time the criteria was met.
You can use the valuewhen function instead:
a = valuewhen(criteria, day(), 1); // Return the day when the last criteria was met
a = valuewhen(criteria, day(), 2); // Return the day when the before last criteria was met"
A couple of additional questions:
1. It looks like I need to write a custom function to be able to find and return all the dates in a symbol where the criteria has been met, I can't find this function anywhere else, is this correct?
2. Another question is about the ability to modify the output of the stock screener to return multiple rows for each different date for the same symbol, but I'm guessing this isn't possible, am I right?
|
|
|
|
Lars Karlsson
2017-08-07 01:41:37
0
|
|
How would I go about to be able to return an array of values from a custom function?
|
|
|
|
Amritendu Maji
2017-08-07 11:14:47
0
|
|
My understanding is that a custom function returns one value per bar. Admin can correct me if I am wrong.
Usually, it is like this...
Result[i] = ResultsForThatBar;
Maybe do a loop in your calling function that will get the results... I don't know this language well enough to provide specifics. I am just trying to see if the logic works.
Good luck.
Maji
|
|
|
|
QuantShare
2017-08-09 06:25:37
0
|
|
Correct. The custom function returns only one array of values. One value per bar.
|
|
|
|