stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Desky. TDesk's trading drone.
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5545
Page 32 of 50
Author:  m4ttc [ Mon Aug 12, 2019 10:51 am ]
Post subject:  Desky. TDesk's trading drone.

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
Author:  tomele [ Mon Aug 12, 2019 10:58 am ]
Post subject:  Desky. TDesk's trading drone.

You need to download the latest version of TDeskSignals.mqh
Author:  m4ttc [ Mon Aug 12, 2019 11:14 am ]
Post subject:  Desky. TDesk's trading drone.

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

Cheers Matey :clap:
Author:  SteveHopwood [ Sat Aug 17, 2019 7:37 pm ]
Post subject:  Desky. TDesk's trading drone.

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:
Author:  Vokin [ Fri Aug 23, 2019 12:15 pm ]
Post subject:  Desky. TDesk's trading drone.

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.
Author:  taipan [ Fri Aug 23, 2019 12:44 pm ]
Post subject:  Desky. TDesk's trading drone.

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
Author:  SteveHopwood [ Tue Aug 27, 2019 2:12 pm ]
Post subject:  Desky. TDesk's trading drone.

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:
Author:  SteveHopwood [ Sun Sep 22, 2019 2:19 pm ]
Post subject:  Desky. TDesk's trading drone.

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:
Author:  taipan [ Tue Sep 24, 2019 1:01 am ]
Post subject:  Desky. TDesk's trading drone.

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
Author:  SteveHopwood [ Tue Sep 24, 2019 10:44 am ]
Post subject:  Desky. TDesk's trading drone.

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:
All times are UTC Page 32 of 50