DA
Topics
30 Apr 2017, 17:31
1958
1
29 Apr 2017, 14:31
2184
5
20 Mar 2017, 11:26
3062
4
03 Mar 2017, 22:51
1887
1
03 Mar 2017, 22:49
3851
6
16 Nov 2016, 11:01
1837
2
Replies
davideng5841@hotmail.com
30 Apr 2017, 17:33
Thank you very much, and is there anyway to disable this button ?..
@davideng5841@hotmail.com
davideng5841@hotmail.com
20 Mar 2017, 14:55
RE:
But this version requires 'unlimited access rights', it there any to bypass it ?
Or an error uring bulid ?
Thank you very much,
tradermatrix said:
HI
c's can be better..? with back commissions deducted, to avoid bad surprises...
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot()] public class LIQUIDATE : Robot { [Parameter("TotalProfit", DefaultValue = 5)] public double TotalProfit { get; set; } protected override void OnStart() { string text = "★ Liquidate ★ By TradermatriX ★"; base.ChartObjects.DrawText("★ Liquidate ★ By TradermatriX ★", text, StaticPosition.TopLeft, new Colors?(Colors.Lime)); } protected override void OnTick() { var netProfit = 0.0; foreach (var openedPosition in Positions) { netProfit += openedPosition.NetProfit + openedPosition.Commissions; } ChartObjects.DrawText("a", netProfit.ToString(), StaticPosition.BottomRight, new Colors?(Colors.Lime)); { if (Account.Equity - Account.Balance > TotalProfit ) { foreach (var openedPosition in Positions) { ClosePosition(openedPosition); foreach (var pendingOrder in PendingOrders) { CancelPendingOrder(pendingOrder); } } } } } } }
@davideng5841@hotmail.com
davideng5841@hotmail.com
03 May 2017, 00:24
RE: Disable "Close All" button
Thank you very much for your advice, have a nice day.
kricka said:
@davideng5841@hotmail.com