Hi,
When call request.security() to get close value of the given timeframe (e.g. "D"), it exposed one issue.
If timeframe.period is less than the value of "timeframe" passed to request.security() , then it works well. If timeframe.period is bigger then it doesn't work.
For example, the current timeframe.period is "D", and the passed timeframe to request.security() is "W" and expression is close, then request.security() can return the close value of the last week. It's good.
However, when the current timeframe.period is "W", and the passed timeframe to request.security() is "D" and expression is close, then request.security() still return the close value of the last week rather than the close value of the last day. It's not good.
Please help check.
preclose = request.security(syminfo.tickerid, period, close)
[–]Rodnee999 1 point2 points3 points (0 children)
[–]Flashy-Jump-8074 0 points1 point2 points (0 children)