EA: 关闭所有仓位

 

关闭所有仓位:

当达到指定利润水平时关闭所有仓位

作者: Vladimir Karputov

 
你好,请教,这个利润是只净值达到目标关闭所有仓位?
 
opmopt :
你好,请教,这个利润是只净值达到目标关闭所有仓位?

Closing positions when the profit level is reached Close all if Profit . In this case, the total profit for all positions is summed up: regardless of the symbol and magic number.

Profit is calculated only at the moment of the birth of a new bar.

 
Vladimir Karputov:

Closing positions when the profit level is reached Close all if Profit . In this case, the total profit for all positions is summed up: regardless of the symbol and magic number.

Profit is calculated only at the moment of the birth of a new bar.

你好,能否修改成,当净值大于某个值时关闭所有仓位?谢谢。

 
opmopt :

你好,能否修改成,当净值大于某个值时关闭所有仓位?谢谢。

Please read the description. When the profit of all positions reaches 'Close all if Profit', all positions are closed.

True, this is a very simple code and there is no 100% guarantee for closing all positions.

 
Vladimir Karputov:

Please read the description. When the profit of all positions reaches 'Close all if Profit', all positions are closed.

True, this is a very simple code and there is no 100% guarantee for closing all positions.

那能将这个代码编写成自动执行的EA?

 
opmopt :

那能将这个代码编写成自动执行的EA?

This is already an advisor.