I'm trying to figure out how to compare current minute open to yesterdays close.
So far I have this:
close_prices = data.history(symbols, 'close', 2, '1d') previous_day_close = close_prices.iloc[-2] def uptrendcheck(): if 'previous_day_close' < 'currentprice': return True else: return False
I'm getting 'NameError: name 'data' is not defined'.
Of course, price is defined elsewhere and working fine.
Please can someone tell me what I'm doing wrong - I'm quite new to this :)
Thanks in advance