Switching on and off of an existing bot into days.

Created at 27 Mar 2021
JU

juice

Joined 09.10.2020

Status

Open


Budget

50.00 USD


Payment Method

Direct Payment

Job Description

I'd like to take an existing bot and have it only open positions on certain days and be idle on other prescribed days.

eg:

Monday - On 

Tuesday - Off

Wednessday  - On

...

 

Also possibly have a limit to the number of trades it can open in a day.

 

 

Comments
Log in to add a comment.
95
9544315 · 3 years ago

//    IF YOU LIKE THE CODE AND WOULD LIKE TO DONATE:                                                            //
//                                                                                                              //
//    XRP (XRP) can be sent to this wallet address                                                              //
//    rMdG3ju8pgyVh29ELPWaDuA74CpWW6Fxns                                                                        //
//                                                                                                              //
//    Basic Attention Token (BAT) can be sent to this wallet address                                            //
//    0x0bFc0EB112E76C96BA8374AEe8005aFfdca7D4c2                                                                //
//                                                                                                              //
//    Litecoin (LTC) can be sent to this wallet address                                                         //
//    LLnDKTB4VEyGLDi33itqZxhvN3AX694zNT                                                                        //

95
9544315 · 3 years ago

ADD the following to your parameters:

 

        [Parameter("Allow Mon", DefaultValue = true)]
        public bool LMon { get; set; }
        [Parameter("Allow Tue", DefaultValue = true)]
        public bool LTue { get; set; }
        [Parameter("Allow Wed", DefaultValue = true)]
        public bool LWed { get; set; }
        [Parameter("Allow Thu", DefaultValue = true)]
        public bool LThu { get; set; }
        [Parameter("Allow Fri", DefaultValue = true)]
        public bool LFri { get; set; }

 

 

ADD the following before your order execution routine:

 

            bool CheckDay = false;
            if (Server.Time.DayOfWeek == DayOfWeek.Monday && LMon == true)
                CheckDay = true;
            if (Server.Time.DayOfWeek == DayOfWeek.Tuesday && LTue == true)
                CheckDay = true;
            if (Server.Time.DayOfWeek == DayOfWeek.Wednesday && LWed == true)
                CheckDay = true;
            if (Server.Time.DayOfWeek == DayOfWeek.Thursday && LThu == true)
                CheckDay = true;
            if (Server.Time.DayOfWeek == DayOfWeek.Friday && LFri == true)
                CheckDay = true;

 

ADD this condition to the order execution line:

 

&& CheckDay

 

 

If the CheckDay becomes true due to one of the selected days being true, your order will be executed.

bienve.pf's avatar
bienve.pf · 3 years ago

Hi. I can do that.

Whatsapp: (+34)654 11 55 47

Telegram: @bienveP

Regards

SA
sascha.dawe · 3 years ago

Hi, 

 

I can help you with your trade days and daily trade limits modification. 

 

Contact sascha.coding@gmail.com

Regards, 

Sascha