Desky. TDesk's trading drone.

Post Reply
User avatar
tomele
Administrator
Posts: 1208
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Desky... has huge potential... :)

Post by tomele »

PeterUK » 04 Dec 2018, 22:19 wrote:Desky does what it's programmed to do... pulling the right trigger(S) when it sees a signal or two from TDesk, after evaluating a selection of custom indicators... i.e. SuperSlope, HGI and etc... :D
I simply hope you won't load that up to the FXTestify database.

Cheers
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
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 2j is in post 1.

2j includes the solution I just described to c1borg in the 'Confused' thread: http://www.stevehopwoodforex.com/phpBB3 ... 23#p165223

It includes some Buy/Sell grid modifying code suggested in a very helpful PM from Mauro this morning. He noticed that the first pending order was not being sent in accordance with ATR when this is being used to calculate DistanceBetweenTrades. He sent me the correction code, so I have used this. Thanks Mauro. :clap: :clap: :clap:

Mauro also asked for an ATR divisor for folks using ATR in their breakeven calculations. The only reason I did not include this originally is that I forgot. I have made it a multiplier - AtrMultiplierBE. Use a decimal value if you want to use a fraction of ATR. For example, input 0.5 if you want to use 50%.

2j includes an idea I had last week. I have no idea whether it can be successful or not - and probably needs substantial tweaking. Play with it and see. From the updated UG:
  • Counter trend scalping: we all know how often a trade initially goes against us. The idea here is take advantage of this with an opposite-direction trade to the current TDesk LONG or SHORT signal. I have no idea if this can be successful – we can only play with it and see. Here is an example of the concept:
    • TDesk generates a LONG signal and sends the appropriate trade:
      • On a short time frame, x candles move against the trade – let's assume two M5 candles for the purpose of this example.
      • Desky sends a short market trade with a stop loss and a take profit. The trades is thus either a quick winner or loser.
      • The inputs:
        • UseCTS: turns this feature on/off.
        • CtsTimeFrame: the shorter time frame to use for scalping.
        • NoOfCandlesInReversal: this is the number of candles that have to go in the 'wrong' direction before Desky sends an opposite-direction trade.
        • CtsTradeComment: this is how Desky knows that he has already sent a scalp trade. We do not want more than one open at a time.
        • CtsTakeProfitPips and CtsStopLossPips: take a guess
      .
: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 »

I just realised that the grid trading solution needs to go inside the pairs iteration loop. I have added result = true; just underneath the code that checks to see if EA trading is allowed.

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

Just so you know folks, there is another update coming before the markets open tomorrow.

Mauro realised the price calculation for the first pending order in the grid could be incorrect if we are not using ATR for the distance between trades.

This is an easy DIY if you want to. Move the price calculation out of the if (UseAtrForGrid) conditional, so the code looks like this:

Code: Select all

   //Using ATR to calculate the distance between trades
   if (UseAtrForGrid)
   {
      double GridAtrVal = GetAtr(symbol, GridAtrTimeFrame, GridAtrPeriod, 1);
      GridAtrVal*= factor;
      DistanceBetweenTrades = NormalizeDouble(GridAtrVal / GridAtrDivisor, 0);
   }//if (UseAtrForGrid)
     
   if (type == OP_BUYSTOP)
      price = NormalizeDouble(price + (DistanceBetweenTrades / factor), digits);      
   else
      price = NormalizeDouble(price - (DistanceBetweenTrades / factor), digits);
Repeat this in the void SendSellGrid(string symbol, int type, double price, double lot) function.

: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 2k is in post 1.

I have added the ability to trade multiple signals up to a choice of your maximum – see, “Multiple market trades” in the ,“Trading styles” inputs. That is where you set your maximum trades allowed and minimum pips distance in between them.

I noticed an imbalance between hedged trade lot sizes and the total of principal trades. I am not sure what is causing this and so have added the conditional that no fresh trades can be taken when a position is hedged. This will show that there is a bug elsewhere in the code if this problem persists.

2k includes the fixes I added on Friday and Saturday.

I have added the ability to hedge following a FLAT signal, after reading this post: http://www.stevehopwoodforex.com/phpBB3 ... 33#p165233

I have added XY42's incremental lot sizing for US citizens trading through OANDA.

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

Some feedback on the latest version. Pending trades are now being placed :good: but multiple times, in this example 2, but as many as 5. I checked and had Multiple Market Trades set to 5 (now 1) but I didnt think this would make a difference as I have the grid set at 1 with a 10 gap. Setfile attached should you need to take a look.
Capture.PNG
I have a feature request if its not too difficult, can we have an option to
a) do nothing or
b) remove the pending trade(s) if the signal goes flat or reverses as an option.

Many thanks for the great work :good:
You do not have the required permissions to view the files attached to this post.
tgm0
Trader
Posts: 22
Joined: Fri Jul 28, 2017 4:18 pm

Desky. TDesk's trading drone.

Post by tgm0 »

c1borg » Mon Dec 10, 2018 6:20 am wrote:Some feedback on the latest version. Pending trades are now being placed :good: but multiple times, in this example 2, but as many as 5. I checked and had Multiple Market Trades set to 5 (now 1) but I didnt think this would make a difference as I have the grid set at 1 with a 10 gap.
Hello c1borg.

Can you confirm the trade were sent using the latest version 2k and not the older 2j?
Your set file is from 2k and this is ok.
The issue with 2 trades sent on the same price was introduced in 2j, but should have been smoothed out in 2k so I suspect your trades were sent on 2j before you upgraded to 2k...

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

Desky. TDesk's trading drone.

Post by c1borg »

tgm0 » Mon Dec 10, 2018 10:08 am wrote:
Hello c1borg.

Can you confirm the trade were sent using the latest version 2k and not the older 2j?
Your set file is from 2k and this is ok.
The issue with 2 trades sent on the same price was introduced in 2j, but should have been smoothed out in 2k so I suspect your trades were sent on 2j before you upgraded to 2k...

Regards,
Mauro
From 2k definitely as it has just placed 2 identical trades again, however the multiple trades of 3 to 5 have now gone.
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 »

Here is 2l.

Counter trend scalping as coded in 2k is a vast loser, so 2l tries a different approach. Taking an original buy trade as an example:
  • TDesk generates a LONG signal, so Desky sends the trade.
  • TDesk goes from LONG to FLAT, so Desky sends a scalping sell.
I have parked 2k so I can return to it if need be. In any case, I shall remove the scalping code if we cannot make it work.

Play around with it and see what you think.

:xm: :rocket:
You do not have the required permissions to view the files attached to this post.
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 »

Mauro just went me a PM with the cause of the doubled trades. I have added some more conditionals so see if this sorts out the problem.

I have applied the changes to 2k in post 1 and 2l here.

:xm: :rocket:
You do not have the required permissions to view the files attached to this post.
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.”