Hi
I appreciate screeners are meant to be for live situations.
However, there is a condition I want to check for at say 8am on Monday morning across many markets and for the result to remain until the following Monday morning at 8am. I want to use this as a reference for live screeners.
I have included a hypothetical example, the example is irrelevant, it’s screening for a condition in a market at a fixed time that I’m after.
I know I could check ‘x bars back’ but obviously x will constantly change during the week.
Any suggestions welcome please.
Thanks, Rob
TIMEFRAME(1 hour)
// I want to SCREEN the condition on Monday at 8am, not live
MondayOpen = 0
IF OpenDayOfWeek = 1 AND Time = 080000 THEN
MondayOpen = 1
ENDIF
OneHourSignal = 0
OneHourEMA20 = ExponentialAverage[20](close)
IF Close > OneHourEMA20 THEN
OneHourSignal = 1
ENDIF
IF Close < OneHourEMA20 THEN
OneHourSignal = 2
ENDIF
Signal = 0
IF MondayOpen = 1 AND OneHourSignal = 1 THEN
Signal = 1
ENDIF
IF MondayOpen = 1 AND OneHourSignal = 2 THEN
Signal = 2
ENDIF
SCREENER [Signal] (Signal as "1 = ↑ / 2 = ↓")
Is anyone able to help me with this please?
Thanks.
Actually, I think I’ve got what I need thanks.
I’m using the bars back option and just calculating how many bars back 8am on Monday is.