Post
· Views 331
修改了一下平仓策略,当同时持有BUY单和SELL单的时候,判断BUY盈利合计和SELL盈利合计,哪个方向是正收益,决定平哪个方向的仓位,且当两个方向的持仓单数量都相等的时候,根据保证金决定采用全部平仓还是盈利方向的持仓单平仓。当两个方向的持仓但数量不相等的时候,根据盈利金额决定全平还是只平掉获利的单子。 这么修改主要是在震荡格局下能够尽快平仓,因为在震荡行情下可能会出现较长时间的持仓,与其拿在手里,不如尽快出局。以期重新寻找一个合适的点位来重新进场。

Disclaimer: The content above represents only the views of the author or guest. It does not represent any views or positions of FOLLOWME and does not mean that FOLLOWME agrees with its statement or description, nor does it constitute any investment advice. For all actions taken by visitors based on information provided by the FOLLOWME community, the community does not assume any form of liability unless otherwise expressly promised in writing.

FOLLOWME Trading Community Website: https://www.followme.com

avatar

Hot

又想到一点,假设BUY和SELL持仓单数量不相等,其中BUY单的数量比SELL的数量多,当SELL盈利大于设置的金额时,EA自动执行了全平的命令,那么就会出现实际平仓完后亏损的现象,所以我增加了一个条件就是BUY盈利和SELL盈利两个的合计数字必须大于0才能执行全平指令

-THE END-