Skip to main content
Version: 1.0.0

RSI Threshold

# register indicator config before strategy simulation
def indicators(I):
I.RSI()

# register custom blocks
def custom_blocks(B):
pass

# handle new bars during simulation
def handle_new_bar(data, emit, blocks):
if data.RSI() > 70:
emit.Buy(type="max", reason="RSI above 70")

if data.RSI() < 50:
emit.Sell(type="max", reason="RSI below 50")