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

TDesk Discussion
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5523
Page 21 of 27
Author:  pMashMash [ Fri Jun 14, 2019 8:07 am ]
Post subject:  TDesk Discussion

tomele » Thu Jun 13, 2019 7:52 pm wrote:Hi again Paul.
pMashMash » 13 Jun 2019, 16:58 wrote:To come back to the spread subject, my TDesk shows correct long term spread values for spread such as 1.1 or 0.7 but for all the spreads with double digit values it is showing wrong values below 1. I think the double digit part might be a good point to start investigating. I have been using TDesk for 2 months now and the spread issue has been the same for me with exotic assets having double digit spreads hence my contribution today.
By describing your observations properly, you have indeed pointed me to a problem. I will have to work on this.

Well spotted. :clap: :clap: :clap:

Cheers
Thomas
Happy to positively contribute Thomas :!!:

Cheers,
Paul
Author:  wojtek_amm [ Sun Jun 23, 2019 9:15 am ]
Post subject:  TDesk Discussion

Hi Thomas,

There is a variable named TDTRADETIME in Global Variables.

What event (or events) in TDesk update and overwrite this variable?

Best Regards
Wojtek
Author:  tomele [ Sun Jun 23, 2019 9:53 am ]
Post subject:  TDesk Discussion

Hi Wojtek.

All TDTRADE... global variables hold data for trading drones and are read by TDeskSignals.mqh.

TDTRADETIME/XXXXXX/NN holds the last Super Signal change time for symbol XXXXXX. It goes into the array TDeskTimes[] provided by TDeskSignals.mqh.

Cheers
Thomas
Author:  wojtek_amm [ Sun Jun 23, 2019 10:27 am ]
Post subject:  TDesk Discussion

tomele » Sun Jun 23, 2019 10:53 am wrote:Hi Wojtek.

All TDTRADE... global variables hold data for trading drones and are read by TDeskSignals.mqh.

TDTRADETIME/XXXXXX/NN holds the last Super Signal change time for symbol XXXXXX. It goes into the array TDeskTimes[] provided by TDeskSignals.mqh.

Cheers
Thomas
Hi,

There is also a variable TDSUPERSIGNAL in Global. TDeskSignals.mqh does not download this variable

What causes this variable to be overwritten - what event?

Are these two variables overwritten at the same time and indicate the same?

Regards,
Wojtek
Author:  tomele [ Sun Jun 23, 2019 11:06 am ]
Post subject:  TDesk Discussion

Hi again.

All global variables that start with TD..., but not TDTRADE... (signals for trading drones) or TDSIG... (signals from drone indicators) are internal variables, mainly for remembering TDesk states after a crash or restart. They are not meant to be used or tampered with by other programs. I will not discuss them.

I strongly advise to only use TDesk.mqh (for sending signals to TDesk) and TDeskSignals.mqh (for reading signals from TDesk). They keep things consistent and there is no additional information that could get derived from reading global variables directly. You will rather mess up the whole system. There will be no support from my side for such problems.

Cheers
Thomas
Author:  SteveHopwood [ Sun Jun 23, 2019 12:47 pm ]
Post subject:  TDesk Discussion

tomele » Sun Jun 23, 2019 11:06 am wrote:Hi again.

All global variables that start with TD..., but not TDTRADE... (signals for trading drones) or TDSIG... (signals from drone indicators) are internal variables, mainly for remembering TDesk states after a crash or restart. They are not meant to be used or tampered with by other programs. I will not discuss them.

I strongly advise to only use TDesk.mqh (for sending signals to TDesk) and TDeskSignals.mqh (for reading signals from TDesk). They keep things consistent and there is no additional information that could get derived from reading global variables directly. You will rather mess up the whole system. There will be no support from my side for such problems.

Cheers
Thomas
:clap: :clap: :clap:

Don't over-think or over-complicate things folks. TDesk does all the work for us, so leave it to do its thingy.

:xm: :rocket:
Author:  wojtek_amm [ Mon Jun 24, 2019 10:04 am ]
Post subject:  TDesk Discussion

tomele » Sun Jun 23, 2019 12:06 pm wrote:Hi again.

All global variables that start with TD..., but not TDTRADE... (signals for trading drones) or TDSIG... (signals from drone indicators) are internal variables, mainly for remembering TDesk states after a crash or restart. They are not meant to be used or tampered with by other programs. I will not discuss them.

I strongly advise to only use TDesk.mqh (for sending signals to TDesk) and TDeskSignals.mqh (for reading signals from TDesk). They keep things consistent and there is no additional information that could get derived from reading global variables directly. You will rather mess up the whole system. There will be no support from my side for such problems.

Cheers
Thomas
Hi Thomas,

I did not ask without a reason. Tdesk + Partner EA in combination in specific situations and configurations generate an incorrect purchase or sale signal.

This happens against the logic and setup of my strategy set in TDesk.

The error is difficult to see if you use many drones. You have to sit all the time and control each newly opened transaction to notice the problem.

Even on the M5 occurs only once for a dozen new open transactions or every few hours. Less inquisitive Trader can ignore such an incorrect position and take SL.

For me, this is a mistake that undermines my strategy, but someone else can say that everything is OK - that was the idea for TDesk.

I wrote an amendment to Partner EA that completely eliminates the problem.

I do not know the TDesk code so the following description of the cause of the error is just my hypothesis. For simplicity only BUY - an example simplified description.

In EA Partner, I have set: MaxSignalAgeMinutes = 3

Tdesk
1. Input only SOLO +100 - the new position opens - OK
2. The VetoSignal and the drone with ForceExit are shown closing the position - OK
3. After a few more minutes, Veto disappears - OK
3. At this point, ValueSolo has, for example, only +33.
4. At this point, SuperSignal returns from the VETO state to its previous state - that is, LONG and simultaneously updates the SuperSignal time variable in GLOBAL - an error is likely to occur here.

! Tdesk does not check if LONG is still valid. - Error

The EA partner sees the change of time in Global for SuperSignal and treats it as a new signal to open (renew) the new position - !!! wrong position, because at this moment SoloValue already has a value of only +33 and the assumption of the entry strategy is not met.

The hypothetical error is that after the disappearance of VETO SuperSignal returns to the previous status (for example LONG) without checking if it is still valid.

Perhaps this is also the case in other cases, such as blocking by SPREAD or NEWS and others?

In my strategy, I generate the VETO signal just to use ForceEXIT - in VETO and ForceEXIT I have the same Drones reported.

A simple amendment to Partner EA completely eliminates the problem.

The original TdeskSignal.mqh gets

Code: Select all

int TDeskSValues ​​[]; // Array holding the Solo Signal values
int TDeskMValues ​​[]; // Array holding the Multi Signal values
so we can use them directly in the EA Partner.

We add the following Code to the EA Partner:

Code: Select all

//1.34
extern string  gen1="----General inputs OPEN SOLO/Multi Signal first New Position----";
extern string  gen11="--------";

extern string  gen12="----Only one option can be -TRUE- SOLO or MultiAndSolo----";
extern string  gen13="----If both Option -FALSE- EA use orginal TDesk signals----";

extern bool    UseDirectSoloValueSignalEntryThreshold   = false;
extern bool    UseDirectSoloAndMultiValueSignalEntry    = false;

extern string  gen14="---- SOLO Value ----";
extern int     BuySoloValueEntryThreshold                  =  95;
extern int     SellSoloValueEntryThreshold                 = -95;

extern string  gen15="----MULTI Value ----";
extern int     UseBUYMultiSignalEntryThreshold            =  10;
extern int     UseSELLMultiSignalEntryThreshold           = -10;
//END 1.34
The original section of the position opening code

Code: Select all

void detectTradingSignal(int pairIndex, int signal)
{

   if (openTrades == 0)
   {
      buySignal = false;
      sellSignal = false;
      if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes || MaxSignalAgeMinutes == 0)
      {
         if (signal == LONG)
            buySignal = true;
         
         if (signal == SHORT)
            sellSignal = true;
            
      
      }//if (if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes))
      
   }//if (openTrades == 0)
   

}//End void detectTradingSignal(int pairIndex, int signal)
we replace

Code: Select all

//1.34 open first new position to work  Direct with SOLO/Multi Signal
void detectTradingSignal(int pairIndex, int signal )
{

   if (UseDirectSoloValueSignalEntryThreshold) 
   {
   if (openTrades == 0)
     {
      buySignal = false;
      sellSignal = false;
      if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes || MaxSignalAgeMinutes == 0)
      {
         if (TDeskSValues[pairIndex] > BuySoloValueEntryThreshold)
            buySignal = true;
         
         if (TDeskSValues[pairIndex] < SellSoloValueEntryThreshold)
            sellSignal = true;
            
      
      }//if (if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes))
      
   }//if (openTrades == 0)
  } // if (UseDirectSoloValueSignalEntryThreshold)
  
  
  
  else
  
   if (UseDirectSoloAndMultiValueSignalEntry) 
   {
   if (openTrades == 0)
     {
      buySignal = false;
      sellSignal = false;
      if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes || MaxSignalAgeMinutes == 0)
      {
         if ((TDeskSValues[pairIndex] > BuySoloValueEntryThreshold)   && (TDeskMValues[pairIndex] > UseBUYMultiSignalEntryThreshold))
            buySignal = true;
         
         if ((TDeskSValues[pairIndex] < SellSoloValueEntryThreshold)  && (TDeskMValues[pairIndex] < UseSELLMultiSignalEntryThreshold))
            sellSignal = true;
            
      
      }//if (if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes))
      
   }//if (openTrades == 0)
  } // if (UseDirectSoloAndMultiValueSignalEntry)
  
  
  else
  
  // Orginal System
  
  if (openTrades == 0)
     {
      buySignal = false;
      sellSignal = false;
      if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes || MaxSignalAgeMinutes == 0)
      {
         if (signal == LONG)
            buySignal = true;
         
         if (signal == SHORT)
            sellSignal = true;
                  
      }//if (if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes))
      
   }//if (openTrades == 0)

}//End void detectTradingSignal(int pairIndex, int signal)

//End 1.34
and that's all.

Now if we use only SOLO or MultiAndSOLO to open a new position, everything works without a problem - At least for ME

Of course, you must correlate SOLO and MULTI values ​​in Tdesk and ParterEA.

The above changes only for those users who have the same problem and understand what they are doing and why. The fact that it works with me does not mean that it will work with your strategy.


! I hope I will not get a lifetime Ban for the above entry.

Regards,
Wojtek
Author:  tomele [ Mon Jun 24, 2019 10:42 am ]
Post subject:  TDesk Discussion

Hi Wojtek.
wojtek_amm » 24 Jun 2019, 11:04 wrote:The hypothetical error is that after the disappearance of VETO SuperSignal returns to the previous status (for example LONG) without checking if it is still valid.

Perhaps this is also the case in other cases, such as blocking by SPREAD or NEWS and others?
Thanks for pointing me to this problem. I will have a look into it.

Cheers
Thomas
Author:  wojtek_amm [ Tue Jun 25, 2019 1:24 pm ]
Post subject:  TDesk Discussion

Error
Author:  tomele [ Tue Jun 25, 2019 4:44 pm ]
Post subject:  TDesk Discussion

wojtek_amm » 25 Jun 2019, 14:24 wrote:Hi Thomas,

In my opinion, it should be possible to choose whether TDesk Universal Drones (all 4 types) have FLAT or NONE output. For example for work withs levels.

Best Regards
Wojtek
Hi Wojtek.

Shouldn't be a problem, although I don't understand the purpose. Please elaborate.

Cheers
Thomas
All times are UTC Page 21 of 27