Product Updates

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

Reviewed by Mike Christensen

Fact-checked by Mike Christensen

2 Min Read
BluSky — The Future of Trading. Prop firm futures trading. Sign up at BluSky.pro.

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. However, user demand could prioritize native support for such features in the future.

The Future of Dynamic Sizing in TradersPost

Customer feedback is central to TradersPost’s development. If demand for automated dynamic sizing grows, native tools could be introduced, offering traders the ability to:

  • 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. With community-driven feedback, such features may become an integral part of the TradersPost ecosystem, further enhancing its role as a leading automation platform.

  • Product Updates Mar 9, 2026

    Pine Script strategy.exit() Changed in v6

    How to fix strategy.exit() calls when migrating from Pine Script v5 to v6, where relative and absolute parameters are now both evaluated.

  • Video
    Product Updates Nov 18, 2025

    AGI’s Impact on the Future of Trading

    Explore the potential impact of Artificial General Intelligence (AGI) on the future of trading. This comprehensive guide discusses how AGI might influence market volatility, trading strategies, and the role of human traders, along with ethical and regulatory considerations to ensure fair and beneficial market practices.

  • Video
    Product Updates Nov 18, 2025

    Are JSON Properties Case Sensitive?

    JSON properties in TradersPost are case sensitive. Users should copy property names directly from the documentation to ensure correct formatting and avoid execution errors.

  • Video
    Product Updates Feb 2, 2025

    Why Does the Sentiment Parameter Sometimes Sell Everything?

    If sentiment = flat is sent, TradersPost closes all positions, ignoring quantity settings. To avoid this, traders should use “action = sell” with a specific quantity for partial exits.

Start trading at scale today. Sign up for free.

Free 7-day trial

Set-up in 3 minutes

Paper account for testing

TradersPost operates as a non-custodial automated trading platform, enabling users to connect alerts from their preferred trading platforms to their selected brokerage or exchange accounts. It abstains from the transmission, custody, or management of customer funds, covering both traditional and cryptocurrency assets. Typically, registration requirements set by regulatory entities such as the SEC, FINRA, or FinCEN apply to entities that hold or transmit customer funds. To ensure ongoing compliance, TradersPost regularly engages with regulatory authorities to confirm its adherence to all relevant local and federal laws.

TradersPost does not provide alerts, signals, research, analysis, or trading advice of any kind. It is designed to assist traders and investors in making their own trading decisions based on their alerts. The platform does not offer recommendations regarding securities to buy or sell, nor does it provide trading or investing advice. The platform and its features, capabilities, and tools are provided 'as-is' without any warranty.

Risk Disclosure: The use of automated trading systems involves inherent risks, including the potential for significant financial loss. These systems operate based on predetermined algorithms that may not fully adapt to changing market conditions, possibly making them unsuitable for some investors. Individuals are advised to thoroughly assess their financial situation and risk tolerance before using this platform.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

© 2026 TradersPost, Inc. All rights reserved.