This script is not intended for trading purposes but gives some examples how you can get values from previous candles in other timeframes, without using security calls.
NOTE: the "open", "high" and "low" values are calculated "on the fly", as the bar progresses, the "close" is determined at the end of the timeframe, so it's only know at the first bar of the next time period
JD.
#NotTradingAdvice #DYOR
Disclaimer. I AM NOT A FINANCIAL ADVISOR. THESE IDEAS ARE NOT ADVICE AND ARE FOR EDUCATION PURPOSES ONLY. ALWAYS DO YOUR OWN RESEARCH!