Libraries: ATS Risk Library - lot size from the stop, daily loss, drawdown and exposure guards
nice implementation, works well on higher timeframes for the levels I checked
You agree to website policy and terms of use
ATS Risk Library - lot size from the stop, daily loss, drawdown and exposure guards:
A small include file for Expert Advisors and trade managers. It turns your risk rules into yes/no answers: how many lots does this stop allow, is the daily loss limit reached, is the maximum drawdown (static or trailing) reached, how much is at risk across all open positions, and are spread and session acceptable. The lot is never rounded up: if the broker minimum lot would risk more than allowed, the trade is skipped and the reason is returned. Limits survive a terminal restart. The library only measures: it sends no order. Includes a demo account guard (no trading by default) and a self-test with 78 checks.
Author: Andrea Michelon