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 »

I know your always very busy :youknow: but I have a feature request :smile: is it possible to close individual pending trades when TDesk Super signal goes to FLAT. My latest experiments seem to be behaving well but I sometimes have to manually close pending signals which didnt make the grade. Obviously I can then tinker with the settings in TDesk which cause the FLAT condition to optimise things. :hi:

Edit: This might be too complex, after giving this further thought as it could effect recovery trades which I also now use. :arrrg:
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 » Thu Jan 03, 2019 5:37 am wrote:I know your always very busy :youknow: but I have a feature request :smile: is it possible to close individual pending trades when TDesk Super signal goes to FLAT. My latest experiments seem to be behaving well but I sometimes have to manually close pending signals which didnt make the grade. Obviously I can then tinker with the settings in TDesk which cause the FLAT condition to optimise things. :hi:

Edit: This might be too complex, after giving this further thought as it could effect recovery trades which I also now use. :arrrg:
I can add it as an option.

It is complicated, because we would also want the pendings reinstating if the signal leaves FLAT again and we have market trades open.

I am taking a few really lazy days. I will look at this next week.

: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 » Thu Jan 03, 2019 11:11 am wrote: I can add it as an option.

It is complicated, because we would also want the pendings reinstating if the signal leaves FLAT again and we have market trades open.

I am taking a few really lazy days. I will look at this next week.

:xm: :rocket:
Very good point
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 2n is inpost 1. This has the pending order deletion function requested by c1borg. From the updated user guide:
  • DeletePendingOrdersOnFlatSignal: tells Desky to delete outstanding buy/sell stop orders in the event that TDesk generates a FLAT signal. Desky will try to replace them if TDesk subsequently returns a trading signal in the direction of an open market trade. For example:
    • You have a market buy open and a grid of 5 buy stop trades.
    • TDesk returns a FLAT signal, so Desky deletes the outstanding stop orders.
    • TDesk changes again and returns a LONG signal. Desky detects the open market order and replaces the pending grid.
  • DeletePendingOrdersOnOppositeSignal: as above. I have included this in case your platform loses contact with your broker's server whilst TDesk generates an opposite-direction signal.
Treat this with suspicion folks, and do not use it on a live money account until proven on demo. It is not the simplest of code I have ever written.

Maybe bloop-spotters might care to run their peepers over it:
  • Line 155 declares the inputs.
  • Line 4471 starts the void DeletePendingOrders(string symbol) function - hard to see what I could get wrong there, but this is me we are talking about here.
  • Line 4828 starts the code block that does all the work.
: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 »

I've been waiting for this can't thank you enough :hi:
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 » Sun Jan 13, 2019 5:05 pm wrote:I've been waiting for this can't thank you enough :hi:
Hehe. Let's see if it works first. :lol:

Any bugs should be easy to squish.

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

Hi @all.

There is a new version of the module that allows communication between TDesk and Desky (TDeskSignals.mqh) here: http://www.stevehopwoodforex.com/phpBB3 ... 22#p163522. It enables Desky to now read and write the Veto Signal settings to the FXTestify database.

Please re-compile Desky with it.

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

Desky. TDesk's trading drone.

Post by c1borg »

SteveHopwood » Sun Jan 13, 2019 5:41 pm wrote: Hehe. Let's see if it works first. :lol:

Any bugs should be easy to squish.

:xm: :rocket:
Feedback...

Desky is opening and closing many pending orders on the same pair almost every second are you seeing this behaviour? I guess it may be that this is what TDesk is telling Desky to do, but I dont have the knowledge to investigate further for you. Otherwise if yours works I may have a bad setting, any thoughts.
Capture.PNG
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 »

V 2o is in post 1, with the fix for the immediate deletion of pending orders.

It took me a while to work out that I had put the code in the wrong place so Desky was responding to a signal belonging to a different pair.

OnTimer() had got to resemble a bit of a bowl-of-spaghetti appearance so I have rationalised. What were previously lumps of code now occupy their own function. This makes the program flow easier to follow, so simplifying adding more functionality in the future.

This might have introduced the occasional bug, but they should be easy enough to squish.

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

Goes without saying many thanks :good: , good news is im getting some success and have been waiting for this as the icing on the cake :hi:

Edit: Early days but seems youve cracked the problem :yahoo:
Post Reply

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