Desky. TDesk's trading drone.

Post Reply
m4ttc
Posts: 2
Joined: Wed Jul 17, 2019 2:54 pm

Desky. TDesk's trading drone.

Post by m4ttc »

I am not having any luck running the desky EA, after looking in the code and compiling I get the error 'FirstTemplateRun' - undeclared identifier on line 764 column 4

I am not quiet sure how to include a screen shot
User avatar
tomele
Administrator
Posts: 1208
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Desky. TDesk's trading drone.

Post by tomele »

You need to download the latest version of TDeskSignals.mqh
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
m4ttc
Posts: 2
Joined: Wed Jul 17, 2019 2:54 pm

Desky. TDesk's trading drone.

Post by m4ttc »

tomele » Mon Aug 12, 2019 6:58 pm wrote:You need to download the latest version of TDeskSignals.mqh

Cheers Matey :clap:
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 3t is in post 1. We have Ehrenmat to thank for this one. :clap: :clap: :clap:

Mat noticed that the win to loss ratio closure was not working and found that the formula never generated a positive value. Mat also added a check to ensure there are no division by zeros errors and some chart info to show the values that Desky is working with.

This is a simple DIY. Go to bool canWecloseByWinToLossRatio() and scroll down to the, "//Not hitting the ratio target" comment. This is a three line snippet, so replace the snippet with:

Code: Select all

   //No Zero Division
   if(totalCashWin == 0 || totalCashLoss == 0)
      return(false);

   //Not hitting the ratio target
   if ((MathAbs(totalCashWin / totalCashLoss)) < WinLossRatio)
      return(false);
You can see the no zero division block.

Go to void displayUserFeedback() and scroll down to: if (UseGridTrading). Insert this block of code above the line of code:

Code: Select all

   if (UseWinToLossRatioClosure)
   {
      SM(NL);
      descr = "Win to Loss Ratio closure is enabled: If we have " + IntegerToString(MinimumLosingTrades) + " Losing Trades, Desky closes at a Win / Loss Ratio of " + DoubleToStr(WinLossRatio, 2); 
      SM(descr + NL);
      SM(NL);
      SM("Losing Trades right now: " + IntegerToString(totalLosingTrades) + NL);
      SM(NL);
      SM("Total Cash Win right now: " + DoubleToStr(totalCashWin, 2) + NL);
      SM("Total Cash Loss right now: " + DoubleToStr(totalCashLoss, 2) + NL);
      if(totalCashWin != 0 && totalCashLoss != 0)
        {
         SM(NL);
         SM("Cash Win / Loss Ratio right now: " + DoubleToStr((MathAbs(totalCashWin / totalCashLoss)), 2) + NL);
        }
      SM(NL);
   }
  
Mat spotted a little cosmetic thingy. Scroll back up to this comment: //This is John's cash basket TS adapted for pips. You will see this line of code immediately above: SM(sizingInfo + NL);

This is in the wrong place and needs to go directly underneath:
+ ": highest = " + IntegerToString(highestPipsUpl);

so that it is inside the conditional block rather than outside. The corrected block will look like this:

Code: Select all

   //This came from DigitalCrypto. Thanks David.
   if (TreatAllPairsAsBasket)
   {
      sizingInfo = "Global basket take profit is active. Market trades count = " + IntegerToString(globalTradesTotal);
      if (BasketTargetCash > 0)
         sizingInfo +=  ": All pair basket cash take profit = " + AccountCurrency() + " " + DoubleToStr(BasketTargetCash, 2) 
         + ": Current = " + DoubleToStr(totalCashUpl, 2) + ": highest = " + DoubleToStr(highestCashUpl, 2);
   
      if (BasketTargetPips > 0)
         sizingInfo +=  ": All pair basket take profit pips = " + IntegerToString(BasketTargetPips)
         + " Current Pips Proft: " + DoubleToStr(totalPipsUpl, 0)
          + ": highest = " + IntegerToString(highestPipsUpl);
     
      SM(sizingInfo + NL);
          
   }
: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
Vokin
Trader
Posts: 51
Joined: Tue Dec 06, 2011 4:31 pm

Desky. TDesk's trading drone.

Post by Vokin »

Something is wrong (maybe my setup?) In last version (3t) i have basket target cash 10, but on screen is another number. I don't know if it's just cosmetic, because my trades are (as usual) in a small profit, therefore Basket TP has not yet been activated.

Regards
V.
You do not have the required permissions to view the files attached to this post.
taipan
Trader
Posts: 355
Joined: Sat Feb 16, 2013 11:27 am

Desky. TDesk's trading drone.

Post by taipan »

Vokin » Fri Aug 23, 2019 8:15 pm wrote:Something is wrong (maybe my setup?) In last version (3t) i have basket target cash 10, but on screen is another number. I don't know if it's just cosmetic, because my trades are (as usual) in a small profit, therefore Basket TP has not yet been activated.

Regards
V.
You have to check the comment fields of all trades either opened or closed position having the same comments, otherwise the EA will not show the correct reading. This is what I had experienced before.

taipan
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 received this PM yesterday.
melgachata wrote:Good morning Steve,
At the risk of being excluded from this forum for asking stupid questions when you have a well written manual (English is not my native language, I am Portuguese), I ask for your help with Tdesk, I am not getting Desky = TDesk Trading Partener EA ??? work out.
I mainly use Empty4 for graph analysis with the respective indicators I have adapted to (I love HGI).
I have read your manual and I understand the full mechanism of Empty4 folders and I know where they are, but I am basically illiterate about EA.
I downlod the Template, Experts, include, indicators, libraries and put them in their folders, and restarted Empty4.
Then I created two XAU charts, in the first I applied the Tdesk template and opened all the charts, in the second I applied the blank template.
In the blank template I tried to put the TDesk Trading Partener EA (I assumed they call it Desky), but nothing happens.
Please kindly urged you to help me and tell me what I'm doing wrong, I'm a peacock, I know :(
I know your time is precious, but I'm getting too paranoid that I can't get this system to work.
Attached I send the contents of the folders and a screenshot of Empty4.
GlobalPrime (demo mode)
Best regards,
Rui (Melgachata)
I do not respond to this sort of request but this one has prompted me to add a tip to post 1 - "Problems loading Desky" at the bottom of the post. I hope it proves helpful to anyone else in difficulties.

: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 »

There is an update to Desky in post one. This is irrelevant to most of you.

One of our members wrote to me to say that incremental lot sizing was not working for a grid of stop/limit orders. I had forgotten to add the relevant coed to the buy/sell grid sending functions. The update attempts to fix this.

To DIY:
Go to: void sendBuyGrid(string symbol, int type, double price, double lot, int gridSize) and scroll down to: getBasics(symbol);
Insert this underneath:

Code: Select all

   //Differential lot sizing
   if (UseIncrementalLotSizing)
      if (!closeEnough(highestLotSoFar, 0))
         lot = normalizeLots(symbol, highestLotSoFar + LotIncrement);
   


Then scroll down to: Sleep(5000);
Insert this above:

Code: Select all

         //Correction for differential lot sizing
         if (UseIncrementalLotSizing)
            if (!closeEnough(highestLotSoFar, 0))
               lot = normalizeLots(symbol, lot - LotIncrement);

Then go to: void sendSellGrid(string symbol, int type, double price, double lot, int gridSize)
and repeat the above process. The code block to insert remains the same for both functions.

: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.
taipan
Trader
Posts: 355
Joined: Sat Feb 16, 2013 11:27 am

Desky. TDesk's trading drone.

Post by taipan »

Hi Steve,

There is a lot repeating Opening and delete log when "DeletePendingOrdersOnFlatSignal is set to true".

see image attached:
expert_log_on when DeletePendingOrdersOnFlatSignal=true.png
When "DeletePendingOrdersOnFlatSignal is set to false", the expert log goes away.

god=-- Pending order deletion inputs --
DeletePendingOrdersOnFlatSignal=true
DeletePendingOrdersOnOppositeSignal=true
DeletePendingOrdersOnEXITSignal=true
rgi=--Rolling grid inputs --
RollingGrid=false
MaxRolledTrades=1
closeGridAtMrtPlusOneLevel=false
gtp=-- Individual grid trades take profit --
UseNextLevelForTP=false

taipan
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 »

taipan » Tue Sep 24, 2019 1:01 am wrote:Hi Steve,

There is a lot repeating Opening and delete log when "DeletePendingOrdersOnFlatSignal is set to true".

see image attached:

When "DeletePendingOrdersOnFlatSignal is set to false", the expert log goes away.

god=-- Pending order deletion inputs --
DeletePendingOrdersOnFlatSignal=true
DeletePendingOrdersOnOppositeSignal=true
DeletePendingOrdersOnEXITSignal=true
rgi=--Rolling grid inputs --
RollingGrid=false
MaxRolledTrades=1
closeGridAtMrtPlusOneLevel=false
gtp=-- Individual grid trades take profit --
UseNextLevelForTP=false

taipan
Thanks. That will be LUC calling around for a coffee. I will sort it out. Cheers.

: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.”