I am having trouble with my strategy and why it isn't selling at the upper band. Any help on how to fix this would be great.
Thanks
I am having trouble with my strategy and why it isn't selling at the upper band. Any help on how to fix this would be great.
Thanks
if (sma_20 > sma_50, price <= lower_band):
I don't know a case where you would use a comma in such a statement, but it doesn't do what you expect since it seems to be always true.
See what happens if you write
if (5 < 4, 3 >= 6):
print('5 < 4, 3 >= 6')
Replace the comma with 'and' in both conditions
if (sma_20 > sma_50 and price <= lower_band):