# scripts/simple_strategy.py
from hummingbot.strategy.script_strategy_base import ScriptStrategyBase
class SimpleStrategy(ScriptStrategyBase):
"""
A simple trading script.
"""
# Configuration
trading_pair = "SOL-USDT"
exchange = "binance"
order_amount = 10
def on_tick(self):
"""Called every tick."""
# Get current price
price = self.connectors[self.exchange].get_mid_price(self.trading_pair)
# Simple logic
if self.should_buy(price):
self.buy(
connector_name=self.exchange,
trading_pair=self.trading_pair,
amount=self.order_amount,
order_type=OrderType.MARKET
)
def should_buy(self, price):
"""Determine if we should buy."""
# Your logic here
return False