Polymarket Bot Exit Logic Enhancement

via Freelancer ·

Budget / Salary$10–30
TypeFreelance project
LocationRemote
Posted1 hour ago
$5-10 MAX Quick Fix

Add Profit Capture Exit Logic (Polymarket Bot)

I need a new exit rule that allows the bot to close positions early once a high percentage of the maximum possible profit is reached, instead of waiting for market expiry.

Logic:

Each position on Polymarket has a max payout of $1.00, so:

max_profit = 1.00 - entry_price
current_profit = current_price - entry_price
profit_ratio = current_profit / max_profit

Exit Condition:

Add a configurable parameter:

profit_capture_threshold (example: 0.70 – 0.85)

If:

profit_ratio >= profit_capture_threshold

Then:

Immediately close the position
Lock in profit
Free up buying power for new trades
Example:

Entry = 0.77
Max profit = 0.23
Current price = 0.94
Current profit = 0.17

profit_ratio = 0.17 / 0.23 ≈ 0.74

If threshold = 0.70 → EXIT
If threshold = 0.80 → HOLD

Notes:
This should work regardless of market expiry
Should not interfere with existing stop-loss, negative-time exits, or copy-trade exits unless explicitly overridden
Goal is to improve capital efficiency and avoid waiting for minimal remaining upside near 1.00

And upload the entire program onto my web app for completed project.
c programming algorithm software architecture metatrader c++ programming api automation bot development
Apply on Freelancer →

Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.