Need to fund security control
Created at 15 May 2013, 10:19
DA
Need to fund security control
15 May 2013, 10:19
Need to fund security control
Requirements:
Loss greater than 200pips perform all close after stop robots
Intentioned people can help me edit this program
Replies
cAlgo_Fanatic
21 May 2013, 17:40
This code will loop through the Account positions when the robot is stoped and each position whose profit is less than 200 pips will be closed. If this is not your algorithm logic please send some more information or example.
protected override void OnStop() { foreach (var position in Account.Positions) { var pipValue = Symbol.PipSize/Symbol.Ask*position.Volume; if (position.NetProfit < -200*pipValue) { Trade.Close(position); } } }
@cAlgo_Fanatic
damon153058
15 May 2013, 10:26
RE:
Can someone please help me with the code?
Thanks
@damon153058