Replies

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:

Yes, that is possible by selecting "Quick Trade Mode"  to the right of the Font selector at the menu at the right-hand top. You can then disable the Close All button by selecting "Disabled (x)  Open an order screen by clicking.

 


@davideng5841@hotmail.com

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