Desky. TDesk's trading drone.

Post Reply
User avatar
c1borg
Trader
Posts: 456
Joined: Sun Aug 14, 2016 5:09 pm

Desky. TDesk's trading drone.

Post by c1borg »

Amazing how fast you work many thanks :hi:
theforexedge
Trader
Posts: 220
Joined: Thu Apr 26, 2012 10:31 pm
Location: Torquay

Desky. TDesk's trading drone.

Post by theforexedge »

Hi Steve
b) remove the pending trade(s) if the signal goes flat or reverses as an option.
I've just really started to play with Desky and if the delete pending trades on FLAT can be added with max number of open trades it would really help me mirror my live trading strategy for testing!

I also have a useful No Supply / demand indicator i've hacked that I think would be useful to add to the indicators pool, but it needs converting to MTF and thats a bit beyond my coding skills :lol:

As always thanks for the dedication of all the coders and contributors here at SHFX helping traders like me realise that trading for a living is possible :smile:

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

theforexedge » Mon Dec 10, 2018 5:32 pm wrote:Hi Steve
b) remove the pending trade(s) if the signal goes flat or reverses as an option.
I've just really started to play with Desky and if the delete pending trades on FLAT can be added with max number of open trades it would really help me mirror my live trading strategy for testing!
This is one of those requested options that emerge with use. I will add it.

: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
c1borg
Trader
Posts: 456
Joined: Sun Aug 14, 2016 5:09 pm

Desky. TDesk's trading drone.

Post by c1borg »

Feedback.... Pending trades now working perfectly :smile:
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 »

c1borg » Tue Dec 11, 2018 8:48 am wrote:Feedback.... Pending trades now working perfectly :smile:
Thanks.

I just read a pm from Mauro stating the opposite.

What is your MaxTradesAllowed input 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. 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
c1borg
Trader
Posts: 456
Joined: Sun Aug 14, 2016 5:09 pm

Desky. TDesk's trading drone.

Post by c1borg »

SteveHopwood » Tue Dec 11, 2018 9:45 am wrote: Thanks.

I just read a pm from Mauro stating the opposite.

What is your MaxTradesAllowed input value?

:xm: :rocket:
Max trades is set to 1
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 »

c1borg » Tue Dec 11, 2018 11:10 am wrote:
SteveHopwood » Tue Dec 11, 2018 9:45 am wrote: Thanks.

I just read a pm from Mauro stating the opposite.

What is your MaxTradesAllowed input value?

:xm: :rocket:
Max trades is set to 1
Thanks. It looks as though it is a combo of MaxTradesAllowed being > 1 and grid trading being enabled that causes the problem.

So folks, if you are grid trading make sure that MaxTradesAllowed = 1. I never intended gridding and multi-trading fresh TDesk signals to mix, so I will enforce the separation in the next release.

: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 2m is in post 1. Most of you can ignore this update.

I have added the candle reversal-based scalping method so that we have both methods to play with. This is the only trading decision that Desky makes independently of TDesk and I am not going to add any more.

Tim wrote to me last night saying that there is a bug in the incremental lot sizing, so I have tried to fix this. Get in touch again please Tim, if the fix does not work.

For those of you who fancy updating without re-downloading, here is what to do:
Do a search for, "extern string sep6a="================================================================";"

Copy this over the top of the existing code:

Code: Select all

extern string  sep6a="================================================================";
//This offers the opportunity to scalp a few pips in the opposite direction
//when an existing trade signal turns to FLAT, on a short timeframe. No idea if it will prove helpful.
extern string  ctsc="---- Counter trend scalping ----";
extern bool    UseCTS=true;
//This is the original CTS feature
extern bool    UseIndependentCTS=false;
//This uses a TDesk FLAT signal when there are already open trades
extern bool    UseTdeskFlatSignal=true;
extern ENUM_TIMEFRAMES CtsTimeFrame=PERIOD_M5;
//The number of candles that must have reversed.
extern int     NoOfCandlesInReversal=2;
extern string  CtsTradeComment="Cts scalp";
extern int     CtsTakeProfitPips=20;
extern int     CtsStopLossPips=10;
////////////////////////////////////////////////////////////////////////////////////////
double         CtsTakeProfit=0, CtsStopLoss=0;
datetime       CtsCandleOpenTime[];
int            CtsOpenTrades=0;
////////////////////////////////////////////////////////////////////////////////////////
Replace the void DoCtsTrading(string symbol, int signal) function with this:

Code: Select all

void DoCtsTrading(string symbol, int signal)
{

   //Handles counter-trend scalping.
   
   //Desky will send a cts scalp trade if there are trades open
   //and TDesk has generated a FLAT signal.
   
   if (CtsOpenTrades > 0)
      return;//Already have an open scalp trade

   
   double take = 0, stop = 0;
   GetBasics(symbol);
   
   //Scalping using the number of ltf candles going against the trade
   if (UseIndependentCTS)
   {
      //Send a scalping sell on a buy signal
      if (signal == LONG)
      {
         //TDesk as generated a LONG signal, so have enough candles
         //fallen to generate a scalp trade short.
         if (HaveEnoughCandlesReversed(down) )
         {
            take = NormalizeDouble(bid - (CtsTakeProfit / factor), digits);
            stop = NormalizeDouble(bid + (CtsStopLoss / factor), digits);
            
            SendSingleTrade(symbol, OP_SELL, CtsTradeComment, Lot, bid, stop, take);
         }//if (HaveEnoughCandlesReversed(down) )
         
      }//if (signal == LONG)
      
      //Send a scalping buy on a sell signal
      if (signal == SHORT)
      {
         //TDesk as generated a LONG signal, so have enough candles
         //fallen to generate a scalp trade short.
         if (HaveEnoughCandlesReversed(up) )
         {
            take = NormalizeDouble(ask + (CtsTakeProfit / factor), digits);
            stop = NormalizeDouble(ask - (CtsStopLoss / factor), digits);
            
            SendSingleTrade(symbol, OP_BUY, CtsTradeComment, Lot, ask, stop, take);
         }//if (HaveEnoughCandlesReversed(down) )
         
      }//if (signal == SHORT)
         
   
   }//if (UseIndependentCTS)
   
   
   //Scalping using TDesk FLAT sognal
   if (UseTdeskFlatSignal)
   {
      if (signal != FLAT)
         return;
      //Send a scalping sell
      if (BuyOpen)
      {
         //TDesk as generated a LONG signal, so have enough candles
         //fallen to generate a scalp trade short.
         if (HaveEnoughCandlesReversed(down) )
         {
            take = NormalizeDouble(bid - (CtsTakeProfit / factor), digits);
            stop = NormalizeDouble(bid + (CtsStopLoss / factor), digits);
            
            SendSingleTrade(symbol, OP_SELL, CtsTradeComment, Lot, bid, stop, take);
         }//if (HaveEnoughCandlesReversed(down) )
         
      }//if (BuyOpen)
      
      //Send a scalping buy
      if (SellOpen)
      {
         //TDesk as generated a LONG signal, so have enough candles
         //fallen to generate a scalp trade short.
         if (HaveEnoughCandlesReversed(up) )
         {
            take = NormalizeDouble(ask + (CtsTakeProfit / factor), digits);
            stop = NormalizeDouble(ask - (CtsStopLoss / factor), digits);
            
            SendSingleTrade(symbol, OP_BUY, CtsTradeComment, Lot, ask, stop, take);
         }//if (HaveEnoughCandlesReversed(down) )
         
      }//if (SellOpen)
               
   }//if (UseTdeskFlatSignal)
   
   
}//End void DoCtsTrading(string symbol, int signal)
For the incremental lot sizing thingy, go to the bool LookForTradingOpportunities(string symbol, int pairIndex, int type) function. A few lines down, you will see this code block:

Code: Select all

   double SendLots = Lot;
   if (UseIncrementalLotSizing)
      SendLots = HighestLotSoFar + LotIncrement;
I have added an extra conditional:

Code: Select all

   double SendLots = Lot;
   if (UseIncrementalLotSizing)
      if (!CloseEnough(HighestLotSoFar, 0))
         SendLots = HighestLotSoFar + LotIncrement;
: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 »

A question for our friends in the US.

Are you folks able to use Desky's grid trading feature, combined with basket trading? If not, would someone explain the FIFO rules in detail so I can do something about it.

: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.
zoltankiss
Trader
Posts: 17
Joined: Thu Mar 21, 2013 9:04 pm
Location: Los Angeles

Desky. TDesk's trading drone.

Post by zoltankiss »

SteveHopwood » Wed Dec 12, 2018 3:43 am wrote:A question for our friends in the US.

Are you folks able to use Desky's grid trading feature, combined with basket trading? If not, would someone explain the FIFO rules in detail so I can do something about it.

:xm: :rocket:
Steve,

Attached the .pdf with a great explanation of FIFO.

I'm not using the grid yet, still fighting to find an acceptable money management for Desky, but it's a bit hard with all these non-sense rules in the US (no hedge, FIFO, usual high spread (average 2-5 pips))

Thank you,

Zolie
You do not have the required permissions to view the files attached to this post.
Post Reply

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