> For the complete documentation index, see [llms.txt](https://www.bfm-unity.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.bfm-unity.org/bfm-urs-wei-mian-jian-meng-lian-he-ti-chu-bei-xi-tong-qu-kuai-lian-jia-mi-huo-bi-hong-guan-tiao-kong/the-tzolkin-calendar/zhuo-er-jin-sheng-ji-a4-zui-da-hui-che.md).

# 卓尔金升级A4——最大回撤

参考：<https://jingyan.baidu.com/article/636f38bb3d678797b8461093.html>

```python
#正数最大回撤
=IF(MAX($A$1:A2)-A2<B1,B1,MAX($A$1:A2)-A2)

#负数最大回撤
=IF(A2-MAX($A$1:A2)>B1,B1,A2-MAX($A$1:A2))

#正数最大回撤比例
=IF((MAX($A$1:A2)-A2)/MAX($A$1:A2)<B1,B1,(MAX($A$1:A2)-A2)/MAX($A$1:A2))

#负数最大回撤比例
=IF(A2-(MAX($A$1:A2))/MAX($A$1:A2)>B1,B1,(A2-MAX($A$1:A2))/MAX($A$1:A2))
```
