Scan for price comparison at two specified times


Category:
0
0

Hello,

I was wondering if there is a way to scan stocks from a personal or public watchlist like SP500 as they hit the following criterion.

  1. Yesterday’s low is below today’s low and today’s low is below yesterday’s low
  2. todays low is also below the low at a specified time ex: first half an hour or 10 am
  3. current price is above the low at a specified time in #2.

I hope you can help me with this scan in TOS. and if the scan can generate alerts, if it is possible in TOS, that would be great.

 

Thanks

 

Marked as spam
Posted by (Questions: 2, Answers: 1)
Asked on May 28, 2020 8:57 pm
62 views
0
Private answer

Item one from your list is impossible. Seems you described a situation where today's low and yesterdays low must both be the lowest of the two days. Obviously that is impossible. They can't both the lower than each other. When you correct for that we might take one side of that. Let's take this one: "today’s low is below yesterday’s low"

plot scan = close < close[1];

That must be a separate scan from the rest. You have to run this on the daily time frame and the other two elements of your scan must run on an intraday time frame.

Items 2 and 3 are quite complex to solve. I barely have time to complete one in the space I provide for free solutions in the Q&A forum. You can modify this to get #3 but I really don't have time to work that out.

input targetTime = 1000;
def newDay = GetDay() <> GetDay()[1];
rec targetPrice = if newDay then 0 else if SecondsTillTime(targetTime) == 0 then low else targetPrice[1];
rec trackLowOfDay = if newDay then low else if low > 0 and low < trackLowOfDay[1] then low else trackLowOfDay[1];
plot scan = trackLowOfDay < targetPrice;

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on May 29, 2020 7:21 am
0
Thanks for your time on this. #1 should read like this. Today's low is below Yesterday’s low and yesterday's low is below previous day’s low. It was my mistake and sorry for the inconvenience. I know these are complicated and time consuming. I was actually looking for someone who can help me develop scripts as I can not do it on my own. Can you please refer me to someone you know who I can work with to have customized scripts developed? I can pay for their service. Much appreciated and thanks again.
( at June 6, 2020 3:47 pm)
0
The professional services we provide are explained on the following page on our website: https://www.hahn-tech.com/about/
( at June 6, 2020 4:06 pm)