Desky. TDesk's trading drone.

Post Reply
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Desky. TDesk's trading drone.

Post by SteveHopwood »

I fixed the negative swap thingy - 3b in post 1.

Easy DIY:
Do a search for, "//OnlyTradePositiveSwap filter". Insert this directly underneath:
TradeLong = true;
TradeShort = true;

Do a search for, "if (UseZeljko && !BalancedPair(symbol, OP_BUY) ) return(false);". Insert this directly underneath:
if (!TradeLong) return(false);


Do a search for, "if (UseZeljko && !BalancedPair(symbol, OP_SELL) ) return(false);". Insert this directly underneath:
if (!TradeShort) return(false);

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
kwchau
Trader
Posts: 305
Joined: Tue Jan 03, 2012 3:37 pm

Desky. TDesk's trading drone.

Post by kwchau »

SteveHopwood » Fri Mar 08, 2019 11:43 pm wrote:I fixed the negative swap thingy - 3b in post 1.

Easy DIY:
Do a search for, "//OnlyTradePositiveSwap filter". Insert this directly underneath:
TradeLong = true;
TradeShort = true;

Do a search for, "if (UseZeljko && !BalancedPair(symbol, OP_BUY) ) return(false);". Insert this directly underneath:
if (!TradeLong) return(false);


Do a search for, "if (UseZeljko && !BalancedPair(symbol, OP_SELL) ) return(false);". Insert this directly underneath:
if (!TradeShort) return(false);

:xm: :rocket:
thank you so much!
User avatar
Tebis
Trader
Posts: 111
Joined: Wed Nov 16, 2011 9:50 am
Location: Switzerland

Desky. TDesk's trading drone.

Post by Tebis »

SteveHopwood » 32 minutes ago wrote:I fixed the negative swap thingy - 3b in post 1.
Hi Steve,
fyi: I am testing the swap function with SPB-3 since Jan 14th.
It works pretty good except with "AUDNZD". If both direction "long/short" has negative swap, the EA opens the trades.
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Desky. TDesk's trading drone.

Post by SteveHopwood »

The DIY fix isn't quite correct - fixed again in 3b.

You need to undo the first step. Go to, "//OnlyTradePositiveSwap filter" and remove the two lines of code you inserted underneath.

Scroll to the top of the function and you will see they are already there. I was preparing to use the swap filter but then forgot to do anything with it.

:D :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
Ehrenmat
Trader
Posts: 89
Joined: Thu Jul 26, 2018 7:08 am

Desky. TDesk's trading drone.

Post by Ehrenmat »

Hey Steve,

I have a request concerning Desky. Is it possible to add an option to delete a grid and/or pending trades after a predefined time? This could be useful when a Super Signal isn't fresh or on its way to become FLAT. In this case, a pending order would get unnecessarily activated, which leads to an avoidable drawdown.

What do you think? Would this be useful?

Thanks for your effort and enjoy your weekend!

Cheers,

Mat

:hi:
Last edited by Ehrenmat on Sat Mar 09, 2019 10:44 pm, edited 1 time in total.
Remember: A few hours of trial and error can save you minutes of looking at the README
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Desky. TDesk's trading drone.

Post by SteveHopwood »

Ehrenmat » Sat Mar 09, 2019 4:37 pm wrote:Hey Steve,

I have a request concerning Desky. Is it possible to add an option to delete a grid and/or pending trades after a predefined time? This could be useful when a Super Signal isn't fresh or on its way to become FLAT. In this case, a pending order would gets unnecessarily activated, which leads to an avoidable drawdown.

What do you think? Would this be useful?

Thanks for your effort and enjoy your weekend!

Cheers,

Mat

:hi:
I can add an expiry time so the pendings will delete themselves.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
Ehrenmat
Trader
Posts: 89
Joined: Thu Jul 26, 2018 7:08 am

Desky. TDesk's trading drone.

Post by Ehrenmat »

SteveHopwood » Today, 19:17 wrote:
I can add an expiry time so the pendings will delete themselves.

:xm: :rocket:

That would be most awesome! :yahoo:

Thanks for replying and have a nice evening!

Cheers,

Mat

:hi:
Remember: A few hours of trial and error can save you minutes of looking at the README
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Desky. TDesk's trading drone.

Post by SteveHopwood »

Ehrenmat » Sat Mar 09, 2019 8:15 pm wrote:
SteveHopwood » Today, 19:17 wrote:
I can add an expiry time so the pendings will delete themselves.

:xm: :rocket:

That would be most awesome! :yahoo:

Thanks for replying and have a nice evening!

Cheers,

Mat

:hi:
The whole point of Desky is so that people can devise trading strategies and then test them quickly and easily without needing a purpose-built EA.

A strategy that depends on stop orders could easily mean that the orders remain in place for a limited amount of time. It makes sense to me to accommodate this kind of request. You are not asking me to add a moving average filter, after all. :lol:

OK, so it also means that Desky gradually becomes harder to use but hey; TDesk/Desky is not a combo designed for dimwits unable to think for themselves. I am getting better at releasing updates with the latest feature disabled, so the worst that can happen is that he stubbornly refuses to trade unless the latest lazy dimwit works out that it needs to read the UG.

So I will add this feature with pleasure. Besides, http://www.stevehopwoodforex.com/phpBB3 ... 58#p166558 is the latest where you prove you are not merely a bottom-feeder.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Desky. TDesk's trading drone.

Post by SteveHopwood »

V 3c is in post 1. This has the option to send an expiry time with pending orders both when responding to a TDesk initial signal and when sending a grid of stop orders. Your inputs are the number of minutes you will allow an unfilled pending to remain: PendingOrderExpiryMinutes and GridOrderExpiryMinutes.

I noticed that the order of inputs in the, "Trading styles" section was confusing, so I have rearranged them. It should be clearer now which inputs apply to immediate market trades and which to pending orders.

DIY:
Do a search for: extern string tst="---- Trading styles ----";

Copy this over the existing block:

Code: Select all

extern string  tst="---- Trading styles ----";
//Send a market trade as soon as there is a signal
extern bool    SendImmediateMarketTrade=true;
extern string  mtr="-- Multiple market trades --";
//This allows the user to send trades following each new signal, up to a selected maximum
extern int     MaxOpenTradesAllowed=5;
extern int     MinDistanceBetweenTradesPips=30;
extern string  pen="---- Pending trades ----";
extern bool    SendPendingTrades=false;
extern PendingTradeTypes TypeOfPendingTrade=Stop_order_only;
extern int     DistanceFromMarketPips=20;
//An expiry time for the stop order
extern int     PendingOrderExpiryMinutes=0;
extern bool    DeletePendingOrderWhenSignalChanges=false;
////////////////////////////////////////////////////////////////////////////////////////
double         DistanceFromMarket=0;
double         MinimumDistanceBetweenTrades=0;
////////////////////////////////////////////////////////////////////////////////////////
That will rearrange the inputs and add the new one.

Do a search for: extern int DistanceBetweenTradesPips

Insert this immediately below:

Code: Select all

//An expiry time for grid stop orders
extern int     GridOrderExpiryMinutes=0;
Do a search for this comment: //if (SendPendingTrades) expiry = TimeCurrent() + (PendingExpiryMinutes * 60);

Delete the comment and replace it with this code block:

Code: Select all

   /*Pending orders can be sent with an expiry time. Desky knows that
   the trade is triggered by a fresh TDesk signal if grid trading
   is disabled. He will send the appropriate expiry if grid trading
   is enabled.
   */
   
   //Is this a stop/limit order
   if (type > 1)
   {
      //Responding to an original signal
      if (!UseGridTrading)
      {
         if (PendingOrderExpiryMinutes > 0)
            expiry = TimeCurrent() + (PendingOrderExpiryMinutes * 60);
      }//if (!UseGridTrading)
      
      //Grid orders
      if (UseGridTrading)
      {
         if (GridOrderExpiryMinutes > 0)
            expiry = TimeCurrent() + (GridOrderExpiryMinutes * 60);
      }//if (UseGridTrading)
      
   }//if (type > 1)
   
This is nearly at the top of the bool SendSingleTrade(string symbol,int type,string comment,double lotsize,double price,double stop,double take) function. I have also added an extra call to GetBasics() right at the top, merely as an extra precaution:

Code: Select all

   GetBasics(symbol);
:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Desky. TDesk's trading drone.

Post by SteveHopwood »

Just remembered - I have changed MaxTradesAllowed to MaxOpenTradesAllowed, so just follow the error messages to make the changes when you compile the code. A global search and replace will also work here.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Post Reply

Return to “TDesk: A Thomas Special. The greatest trading tool ever.”