Random dYdX Futures Trading With Fixed Exits and Loss-Based Sizing
Summary
This tutorial designs a deliberately random dYdX futures strategy to illustrate automated trading logic. It chooses long or short at random, enters using order-book prices with a slippage allowance, and exits at fixed profit or loss thresholds. After a loss, the next trade size multiplier increases; after a win, it resets. The code also handles open orders, position checks, account tracking, and status display.
The article says backtests were used to look for bugs, then describes running the strategy live for experimentation; screenshots are provided, but no performance figures or evidence of a durable edge are given. The author emphasizes that the example is for learning. Random direction offers no predictive advantage, while transaction costs can worsen results. Increasing size after losses creates escalating exposure and does not ensure recovery; the approach can produce severe drawdowns or account loss, particularly during extended losing streaks.
Key ideas
- The strategy selects long or short direction randomly rather than using a market signal.
- Fixed profit and loss thresholds determine whether a trade is treated as a win or loss.
- The position multiplier rises after losses and returns to its initial level after a win.
- Order-book checks and order cancellation are included to manage entries and exits.
- The article presents the strategy as a design exercise, without evidence that it has positive expected returns.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.