Features & Settings

Can You Automate Position Sizing After Losing Trades?

Dynamic position sizing after losses is a smart risk management strategy. Learn how to automate this process using Pine Script and TradersPost webhooks.

Tom Hartman

Marketing

2 Min Read Reviewed by Mike Christensen Fact-checked by Mike Christensen
BluSky — The Future of Trading. Prop firm futures trading. Sign up at BluSky.pro.
Update history
  1. Clarification

    Current TradersPost documentation still shows outcome-based position sizing as custom rather than native, so the guidance now qualifies its speculation about future native support while the core conclusion remains accurate.

Adjusting position sizes based on prior trade outcomes is a well-known risk management technique often associated with strategies like the Kelly Criterion. TradersPost doesn’t natively support dynamic position sizing based on previous trade results, but with custom scripting, this functionality can be implemented. This guide explores how traders can achieve this using Pine Script and why dynamic position sizing is a valuable tool.

Why Adjust Position Size After Losses?

Dynamic position sizing based on trade outcomes allows traders to:

  • Recover Losses: Increasing size after a loss can help offset previous setbacks.
  • Optimize Risk: Strategies like the Kelly Criterion adjust risk exposure based on win probability, enhancing long-term returns.
  • Adapt to Market Conditions: Adjusting size based on performance aligns risk with current market dynamics.

How to Automate Dynamic Position Sizing

1. Using Pine Script to Track Trade Outcomes

TradersPost relies on external signals for trade execution. Pine Script on TradingView can be used to track trade performance and send updated position sizes to TradersPost.

2. Sending Alerts to TradersPost

Integrate the Pine Script logic with TradersPost by configuring alerts to send dynamic position sizes via webhooks. Example webhook JSON:

Potential Challenges

1. Complexity in Multi-Broker Environments

For strategies running across multiple brokers, dynamic position sizing must account for differing account balances and margin requirements.

2. Over-Leveraging Risks

Increasing position sizes after losses can lead to compounding risks. Ensure position adjustments align with overall risk management parameters.

3. Platform Limitations

While TradersPost focuses on order execution and trade management, advanced risk features like automated sizing require custom solutions. Native support for such features is not currently available1.

The Future of Dynamic Sizing in TradersPost

Customer feedback is central to TradersPost’s development. Automated dynamic sizing currently requires custom tools, offering traders the ability to:1

  • Adjust size based on win rates or historical performance.
  • Automate position sizing strategies like the Kelly Criterion.
  • Integrate risk management metrics directly into the platform.

Conclusion

Automating position size adjustments after losing trades is a powerful strategy for managing risk and optimizing performance. While TradersPost doesn’t currently support this feature natively, traders can implement it through custom Pine Script logic and webhooks. Custom Pine Script logic and webhooks remain the approach for implementing such features within the TradersPost ecosystem, further enhancing its role as a leading automation platform1.

References

1 youtube.com, Position Sizing After LOSING Trades

  • Post-Only Order: How It Works

    Post-only orders guarantee maker-side execution or cancellation. Learn how they work, why exchanges cancel or reprice them, and when to use one.

  • Difference Between Mark And Last In TOS

    Mark price and last price mean different things on trading platforms. Learn how each is calculated, why they diverge, and which to use for stops.

  • Broker Rules Now Follow the Asset Class

    Learn why a setting disappeared in TradersPost: broker rules for order types, shorting, and time in force now apply per asset class, not per broker.

  • Walk-Forward Optimization Trading Guide

    Master walk-forward optimization trading to test strategies across market regimes, reduce curve fitting, and prepare alerts for disciplined automation.

Ready to put what you read into practice?

Free 7-day trial

Set-up in 3 minutes

Paper account for testing

By continuing, you agree to the TradersPost Terms of Service and Privacy Policy. This site is protected by reCAPTCHA.