I got double filled or the wrong size
A double fill usually comes from the alert side or from stacked entries. Here is how to find which.
When an automation opens more size than you meant, the cause is almost always your TradingView alert or your risk limits. Check them in this order.
Lune already blocks accidental repeats#
Lune ignores an exact-duplicate same-side entry when the open position already came from the same automation. So a repeated alert does not double your size by accident. This guard is always on, and it never blocks a manual, copied, or external position.
A same-side entry that changes the size is not a duplicate. Lune processes it and adds to the position. That is what lets martingale, DCA, and scale-in strategies build a position across alerts. If you did not mean to build a position, the extra size is coming from the alert side, below.
Check TradingView first#
A very common cause sits on the alert side, not in Lune. If your TradingView strategy uses pyramiding, it can send several entry orders for one setup. Lune places what the alert tells it to place. Lower the pyramiding value in your strategy settings if you only want one entry.
A partial exit with a size of 1 rounds up to a full contract exit, because futures trade in whole contracts. If you meant to close part of a single-contract position, it closes the whole thing.
How to fix it#
Open your account risk limits and set the most size you want an account to hold. This caps oversizing right away. See Risk management.
In your TradingView strategy, set pyramiding to match how many entries you actually want.
Check that each alert sends the size you intend, so a single setup does not send more than one entry.
To understand how adds and duplicates behave, read the Auto Trader guide.