♥ 0 |
Hello, Is there a way to scan whenever current closing price of a 5 min bar crosses above yesterday’s close or yesterday’s high. Please see screenshot for details. RESOLVED
Marked as spam
|
Please log in to post questions.
Thank you! I have just added it as a dynamic watchlist and set it up to get alerts. I will let you know if it doesn’t work.
My apologies. After seeing your comment I looked at the code and immediately found an error. I just updated the code in my answer and this version should work.
Pete, I think the new code did not attach.
I did not attach any code to my last comment. I updated the code that is contained in my answer.
Hi Pete…
Scanner doesn’t output any results. My scanner simply has below lines of code without any other standard filters.
def newDay = GetDay() GetDay()[1];
rec highOfDay = if newDay then high else if high > highOfDay[1] then high else highOfDay[1];
rec prevDayHigh = if newDay then highOfDay[1] else prevDayHigh[1];
rec prevDayClose = if newDay[-1] then close else prevDayClose[1];
# use this to scan for close crossing above previous day high
#plot scan = close[1] prevDayHigh;
# use this to scan for close crossing above previoud day close
plot scan = close[1] prevDayClose;
I set this up for myself and it is returning results on a 5 min time frame. I have no idea why it is not working for you. What time frame do you have the scan set to?
I set it up on 5 min time frame..
Pete..I apologize..I had some other parameters that was restricting the scan results. It is working fine..
Thank you much! Truly appreciate your help..