In the last post, we left off explaining what our first program does. It creates a file to be filled by the user so that the rest of the bot can run.
The idea of trading and making money is pretty basic: “just” buy low and sell high.
But how do we know what’s low and what’s high?
It’s relative.
Back in January 2015, BTC was worth around $265 USD.
A year later, it was around $430.
At the time, people might’ve said BTC was already in the clouds — but was it really?
A bot that buys low and sells high won’t guarantee you money,
but if a coin has a history and tends to hover around a certain range,
you can bet it’s not going to crash out of nowhere.
BTC is a good example of a coin that moves within a range,
occasionally shoots up, comes back down, and overall — in the big picture — climbs over time.
ETH also tends to stay in the $1600–$2000 range,
occasionally jumping to $4000 before settling back down.
Now imagine you’re running a trading bot that aims to maintain $3500 in ETH.
If the price drops for a year, selling just to “cut losses” would be a bad idea —
because you only lose (or gain) money when you actually sell.
The bot I’m building is based on that kind of understanding.
It’s not meant to lose money — it only acts when opportunities appear.
For example, if you want to hold $2000 worth of ETH and the price drops,
the bot will buy more to maintain your target.
When the price rises, it won’t sell unless it's profitable based on the percentage you’ve set.
We can’t control coin prices — only what we buy and sell.
That means nothing is certain, and every trade is a calculated risk.
This bot maintains a target — say, $100 — in any coin you choose.
If the price drops, it checks if it can buy (based on exchange minimums).
When it buys, it records:
How much USDT it spent.
What price it bought at.
How much of the coin it got.
Then, every time the price updates, it checks if any of those buys are in profit.
If so, it sells based on the profit_pct value you set in the config file.
I’ve also been working on a trailing feature to avoid selling too early when a coin is shooting up —
but I’m still figuring out how to make that part work.