Desky. TDesk's trading drone.

Post Reply
User avatar
WorldsEnd
Trader
Posts: 95
Joined: Fri Aug 29, 2014 7:36 pm

Desky. TDesk's trading drone.

Post by WorldsEnd »

Thx Thomas! Well, I can confirm that it is a TDesk issue. Check my screenshots please.
5BE90A08-6FD5-4814-B166-B7C6FC6D183C.png
Pending order placed by Desky when TDesk signals agreed.
EC29D86B-70BB-4F22-8CA3-85DA9C32DF71.png
Price closed below the MA. Exit condition for the pending trade fullfilled according my setup.
E2F96FCC-3E95-4973-8808-171621184D36.png
TDesk shows opposite MA cross. Exit condition valid ... but no exit signal in the SuperSignal column.
9103B35E-E91B-4DD4-B8E2-29C70309D3F2.jpeg
Condition as defined within TDesk.
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9754
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 »

WorldsEnd » Wed Apr 01, 2020 1:15 pm wrote:Thx Thomas! Well, I can confirm that it is a TDesk issue. Check my screenshots please.
Oh boy but you have a forum death wish.

Having accused me of miscoding Desky, you are now accusing Thomas of mscoding TDesk.

That is idiocy of the highest order.

You are now removed to that group of dimwits unable to post without said post gaining the approval of our highly critical moderators.

Mods, the guy is an idiot. Do not pass his posts. Delete his registration if he tries to post again.

Or leave him to me. I shall ban him and delete his registration if he tries to post again. Up to you.

I trust I make myself clear about the future of dimwits at SHF?

Again?

Really?

Dream on folks.

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. [email protected] 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: 9754
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 thought about it for a while then decided to ban worldsend just to remind you folks that shf is not a place for lazy and/or thoughtless morons.

Senior members of SHF have been doing this stuff for years. I am talking over a decade. The rest of you are enjoying the fruits of our studies. We are not fans of lately-come-jonnies who think they know better than us.

You think you know better than the rest of us?

Fuck off and play in a different sand pit. Do not come whinging to us when you lose all your deposit. We know what we are doing. You do not.

:xm: :rocket:




Or join us in :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!:

Your choice

: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. [email protected] 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: 9754
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 am a touch on the irritated side here tonight.

Bear in mind when you read the above that it is an example of Masterly British Understatement.

Then read up a couple of posts.

I trust I make myself clear folks.

: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. [email protected] 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: 9754
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 »

Version 4j is in post 1.

You will be aware that I coded Moving Day's scale out/back in feature so that it will work with account based lot sizes, if you have been following his progress. Desky is a much more complicated EA than MD, so there may be a need for additional coding elsewhere. Sing out if there appears to be any undesirable behaviour.

Coders, I have made some changes to void countOpenTrades(string symbol). It occurred to me that merely restarting the loop counter following a scale out part closure, or full trade closure, meant that the totals would build from where they were before the closure and so all be incorrect. They could be wildly wrong.

This will be the same for any EA I have coded that uses scale out/in and could explain those events we have had where a basket of trades has closed for no reason that we can see. No certainty here, but a possibility.

I have added a new function, void initialiseVariables(string symbol). I have moved all the variables that used to initialise at the top of COT to this function and replaced them in COT with: initialiseVariables(symbol);

Search COT for: //Scale out stop loss

You will see how I have reinitialised all the variables so the loop restarts with all variables initialised to zero, or 'false' or whatever is needed..

: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. [email protected] 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: 9754
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 4k is in post 1. I was looking at updating the SPB Core LIbrary with some of the edits I made to MD and Desky. I copy/pasted the changes into the core library and noticed that some of the logic is wrong. :arrrg:

The easiest DIY is to download 4k, go to void countOpenTrades(string symbol, int pairIndex) and copy/paste the entire function over the top of the version you want to keep. Go to line 2004 in the downloaded version 4k to see how I have changed the logic.

: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. [email protected] 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: 9754
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 »

Something for you folks to bear in mind when downloading updates - viewtopic.php?p=169918#p169918

I never think about this as I am always using the latest version of my software. You folks definitely need to bear it in mind.

: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. [email protected] 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: 9754
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 1l is in post 1. It is irrelevant to most of us.

One of our members wrote to me asking me to implement FIFO for our North America members. I thought I had done this automatically bur Tim told me that it is the code that catches failed closures and forces a retry that eventually closes all the orders in a global basket closure event. These loops generated lots of FIFO 'violations'.

I have added the new input MustObeyFifo at the top of the basket trading section. void globalBasketClosure() is the function called whenever any global position closure is needed. I have put this at the top of the function:

Code: Select all

   //FIFO rules for US citizens
   if (MustObeyFifo)
   {
      globalBasketClosureFifo();
      return;
   }//if (MustObeyFifo)
 
Then the called function directly above void globalBasketClosure() :

Code: Select all

void globalBasketClosureFifo()
{

   /*
   Emulates void globalBasketClosure() for US citizens; 
      - continuouwly cycle through the OtdersTotal() orders until there are none left.
      - at each OrdersTotal() - 1 call CountOpenTrades to build an arry of tickets, then close/delete them.
   */
   
   
   while (OrdersTotal() > 0)//Iterate through until there are no orders left
   {
      if (OrdersTotal() == 0)
         return;//Just in case
         
      if (!betterOrderSelect(OrdersTotal() - 1, SELECT_BY_POS, MODE_TRADES) ) 
         continue;//Judt in case
         
      string symbol =OrderSymbol();//Makes typing easier
      countOpenTrades(symbol);
      
      /*
      My thinking is this:
         - The lower the ticket number, the further back in time the order was sent. We are up shit creek
               if this is not true.
         - COT stores these ticket numbers in the fifoTicket[] array, sorted by MODE_DESCEND,
            so closeAllTrades() should work.
      */   
   
      closeAllTrades(symbol, allTrades);
   
   }//while (OrdersTotal() > 0)
   

}// End void globalBasketClosureFifo()

I have explained my logic, so I would appreciate it if any passing Proper Coders who also understand FIFO and sing out if they see anything wrong.

:clap: :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. [email protected] 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
rahmatfx
Posts: 3
Joined: Sat Jun 09, 2018 2:41 pm

Desky. TDesk's trading drone.

Post by rahmatfx »

Hi, Steve.

I have gone from forex world for long time and few weeks ago I went back and found many updated good stuffs here, especially Tdesk Trading Drone. Thank you so much to Thomas and you, Steve, for this great tool.

I have tried it and found a dead end working with Desky. I hope anyone here can help me with it.

Here is the case. Sometimes when Tdesk broadcasts Super Signal, Desky won't open the trade. Here is the setting that might have correlation:

- I use hard lot for my system
- SendImmediateMarketTrade = true
- Multiple market trades is enable. I don't use grid trading.
- IndividualPairsAsBasket = true
- Hedging = only opposite direction of signal
- PercentageToHedge = 100%
- The hedge trade is always opened until cash target hit.
- MaxTradesPerDay = false

For example, I have 2 open buy trades, total is 0.02 lot. Before reaching the individual basket, TDesk generates the opposite direction signal. So based on my setting above Desky then open 0.02 lot sell trade (hedge trade) plus 0.01 lot (hard lot). Now I have 0.02 lot of buy trades and 0.03 lot of sell trades. Again before reaching my target, the price moves up and TDesk generates new buy trade. But now, Desky won't open any new buy trades. That's my case.

I thought Desky should open new buy trades based on my setting above so I can follow the fresh uptrend until my target is hit. I don't know what the issue is, I have changed the setting for many times but still always face dead end.

Can you help me with it, Steve? Or anyone here? I will thank you so much.

And I have a suggestion with Desky. I don't know, maybe it's just a stupid idea. It can be very useful if Desky has an option to filter how many round we trade a pair in specific time period. For example, today I have closed GBPUSD with my target cash, but I won't open any fresh trade with GBPUSD if TDesk generates a new signal, until tomorrow (maybe there is an option for what time Desky will start trading the pair again, some trader chose to start trading in Euro Session) and I let other running pairs to run until hit my target. I mean I will trade a pair once a day, or maybe twice a day or once a week, with target cash on that pair is accomplished. I know there is an option OnlyTradeCurrencyTwice, but it is not based on a specific time period. It is just my humble suggestion.

Forgive me for my bad english.

Update: I just analyzed my open trades, I think the issue is I changed Desky's setting during it runs, so next new trade is distracted. I think the true logic is the first hedge trade is 0.02 lot without additional 0.01 lot (hard lot). My question is when price moves back up, Desky will open new hedge trade (maybe we call it counter hedge, which is 0.02 lot, equal to existing hedge trade) or just 0.01 lot (hard lot)? Or maybe is it possible to open hedge trade plus hard lot when the opposite signal appears (not by percentage)?
Last edited by rahmatfx on Fri Aug 07, 2020 9:08 pm, edited 1 time in total.
User avatar
SteveHopwood
Owner
Posts: 9754
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 »

rahmatfx » Fri Aug 07, 2020 8:22 pm wrote:Hi, Steve.

I have gone from forex world for long time and few weeks ago I went back and found many updated good stuffs here, especially Tdesk Trading Drone. Thank you so much to Thomas and you, Steve, for this great tool.

I have tried it and found a dead end working with Desky. I hope anyone here can help me with it.

Here is the case. Sometimes when Tdesk broadcasts Super Signal, Desky won't open the trade. Here is the setting that might have correlation:

- I use hard lot for my system
- SendImmediateMarketTrade = true
- Multiple market trades is enable. I don't use grid trading.
- IndividualPairsAsBasket = true
- Hedging = only opposite direction of signal
- PercentageToHedge = 100%
- The hedge trade is always opened until cash target hit.
- MaxTradesPerDay = false

For example, I have 2 open buy trades, total is 0.02 lot. Before reaching the individual basket, TDesk generates the opposite direction signal. So based on my setting above Desky then open 0.02 lot sell trade (hedge trade) plus 0.01 lot (hard lot). Now I have 0.02 lot of buy trades and 0.03 lot of sell trades. Again before reaching my target, the price moves up and TDesk generates new buy trade. But now, Desky won't open any new buy trades. That's my case.

I thought Desky should open new buy trades based on my setting above so I can follow the fresh uptrend until my target is hit. I don't know what the issue is, I have changed the setting for many times but still always face dead end.

Can you help me with it, Steve? Or anyone here? I will thank you so much.

And I have a suggestion with Desky. I don't know, maybe it's just a stupid idea. It can be very useful if Desky has an option to filter how many round we trade a pair in specific time period. For example, today I have closed GBPUSD with my target cash, but I won't open any fresh trade with GBPUSD if TDesk generates a new signal, until tomorrow (maybe there is an option for what time Desky will start trading the pair again, some trader chose to start trading in Euro Session) and I let other running pairs to run until hit my target. I mean I will trade a pair once a day, or maybe twice a day or once a week, with target cash on that pair is accomplished. I know there is an option OnlyTradeCurrencyTwice, but it is not based on a specific time period. It is just my humble suggestion.

Forgive me for my bad english.
I have no idea what the cause of your problem is, nor will I investigate. Desky responds to signals generated by TDesk. Apart from the ignored anti-trend stuff and the usual trade management features, it has no independent decision making code. It is up to you to decide how to make Desky behave in response to TDesk signals.

I will mention just one thingy from your post: MaxTradesPerDay = false

MaxTradesPerDay is an integer not a boolean. Setting it to 'false' is the same as setting it to zero, as 'false' has the integer value of zero. Desky probably should not be trading at all at this value.

: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. [email protected] 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.”