STRATEGY EDITOR
1
# Type your trading strategy here
# Example:

def strategy(data, position):
    """Your trading strategy"""
    if len(data) < 2:
        return None
        
    # Calculate price change
    current_price = data[-1]
    previous_price = data[-2]
    price_change = (current_price - previous_price) / previous_price * 100
    
    # Example logic
    if price_change > 1.0 and not position.has_position:
        return Order.buy(amount=10000)
    elif price_change < -1.0 and position.has_position:
        return Order.sell(amount=position.quantity)
    
    return None
PORTFOLIO PERFORMANCE
SYSTEM OUTPUT
 ██████  ██    ██  █████  ███    ██ ████████ 
██    ██ ██    ██ ██   ██ ████   ██    ██    
██    ██ ██    ██ ███████ ██ ██  ██    ██    
██ ▄▄ ██ ██    ██ ██   ██ ██  ██ ██    ██    
 ██████   ██████  ██   ██ ██   ████    ██    
    ▀▀                                        
by Relative Companies
>