Price within specified amount of daily open


Category:
0
0

Hello Pete

Is there a way to scan how much Price has moved Away from the DailyOpen above and below.
Example Price is Above DailyOpen but < $0.15 away from it

I’m looking to scan by how much it moved by price instead of percentage
Same for below
I found the field for Daily Open on TOS Watchlist field (Average Trade Price) but it’s locked so I can’t see the code to make a custom script from it.
Any info you have about this would be greatly appreciated .

Thank you

Ellis

Marked as spam
Posted by (Questions: 3, Answers: 5)
Asked on November 30, 2023 4:22 pm
55 views
0
Private answer

Here is the simplest solution which meets your specifications:

input targetAmount = 0.15;
def newDay = GetDay() <> GetDay()[1];
rec dailyOpen = if newDay then open else dailyOpen[1];
def changeFromOpen = AbsValue(close - dailyOpen);
plot scan = changeFromOpen <= targetAmount;

This solution requires the Study Filter of the scan be set to any intraday time frame but the Extended Hours must be turned off.

Since you specified "Above or Below" and within the target I did not include separate scan signals for "Above and within target" and "Below and within target". This solution simply finds current price within the target range regardless whether the price is above or below the daily open.

Marked as spam
Posted by (Questions: 37, Answers: 4097)
Answered on November 30, 2023 5:31 pm
0
Hello Pete Thank again for all the help you have given me. This is exactly what I needed. Ellis
( at December 1, 2023 4:50 am)