Desky. TDesk's trading drone.

Post Reply
cptcherry
Posts: 9
Joined: Thu Dec 17, 2015 10:53 pm

Desky. TDesk's trading drone.

Post by cptcherry »

Thanks for fixing the bug Steve, c1borgs addition, i thought was really helpful.
amazing work on Desky!! :yahoo: :yahoo: :clap: :clap:
Lots of pips since implementing. Just need to keep track of the profitability of each variation I am currently running.
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 »

Folks, this is nothing to do with Desky. Have a read of Jem's latest post at http://www.stevehopwoodforex.com/phpBB3 ... 39#p165939

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

Bit of feedback on ver q....

Working brilliantly so far :smile:
Capture2.png
but may have found a bug. I have this situation
Capture.PNG
With this setting
Capture1.png
The 2 pending orders with FLAT signals dont seem to be deleted is this the correct behaviour?
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 »

c1borg » Wed Jan 30, 2019 8:39 pm wrote: The 2 pending orders with FLAT signals dont seem to be deleted is this the correct behaviour?
Probably. Don't really know. Not had the same position.

: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 » Wed Jan 30, 2019 9:32 pm wrote:
c1borg » Wed Jan 30, 2019 8:39 pm wrote: The 2 pending orders with FLAT signals dont seem to be deleted is this the correct behaviour?
Probably. Don't really know. Not had the same position.

:xm: :rocket:
Curious as it has now decided to delete some pending trades :good: I will keep an eye on things but very happy many thanks again :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 »

V 2r is in post 1, in response to c1borg's post in the Confused thread: http://www.stevehopwoodforex.com/phpBB3 ... 32#p166032

The code that deletes pending orders on a FLAT signal was underneath the code that detects a NONE signal and stops Desky from doing anything at all. We do not want that, so I have moved the code higher.

Easy DIY. Do a search for, "//Code to delete pending orders when the signal goes FLAT,". Delete the block of code.

Then do a search for, " //Lot size based on account size" and insert the code block you just deleted, just above the lot calculation block. Your code will look like this:

Code: Select all

      //Code to delete pending orders when the signal goes FLAT,
      //then replace them when the signal turns back to trading.
      DoPendingOrdersDeletionAndReplacement(symbol, signal);
      
      //Lot size based on account size
I will work out an 'orphaned' pending trade function to pick up on anything else like this.

: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 » Wed Feb 06, 2019 6:01 pm wrote:V 2r is in post 1, in response to c1borg's post in the Confused thread: http://www.stevehopwoodforex.com/phpBB3 ... 32#p166032

The code that deletes pending orders on a FLAT signal was underneath the code that detects a NONE signal and stops Desky from doing anything at all. We do not want that, so I have moved the code higher.

Easy DIY. Do a search for, "//Code to delete pending orders when the signal goes FLAT,". Delete the block of code.

Then do a search for, " //Lot size based on account size" and insert the code block you just deleted, just above the lot calculation block. Your code will look like this:

Code: Select all

      //Code to delete pending orders when the signal goes FLAT,
      //then replace them when the signal turns back to trading.
      DoPendingOrdersDeletionAndReplacement(symbol, signal);
      
      //Lot size based on account size
I will work out an 'orphaned' pending trade function to pick up on anything else like this.

:xm: :rocket:
Many thanks again :good: will report back.
User avatar
c1borg
Trader
Posts: 456
Joined: Sun Aug 14, 2016 5:09 pm

Desky. TDesk's trading drone.

Post by c1borg »

Ok just watching this trade live it placed a pending SELL trade bang on time as far as I could see, then went to a FLAT signal and it hasnt deleted as yet. Could it be my chart is set for 1H and it needs to wait for a new bar or should it delete immediately?
Capture.PNG
Edit:
Looks like the SELL trade was made at the start of the new H1 bar now FLAT 15m old and still there
Edit:
Next bar just begun still FLAT and pending trade refuses to budge
Capture1.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 2s is in post 1.

c1borg solved the conundrum of the non-deleted pending orders. He spotted that I had coded only the grid orders, not those generated when SendPendingTrades is enabled.

Reading another programmers code is hard even when you are used to doing so. Managing it when you are a fledgling coder is just plain bloody marvelous, so well done and thanks, c1borg. :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap:

I decided to separate the pending order deletion decisions, so watch your inputs if you download 2s:
  • DeletePendingOrdersOnFlatSignal and DeletePendingOrdersOnOppositeSignal are now in the grid section.
  • DeletePendingOrderWhenSignalChanges has replaced them in the "Trading styles"; orders will be deleted if the spread widens above acceptable levels.
DIYers, do a search for, "//Pending order deletion following a FLAT or opposite direction signal." Copy this code into your clipboard:

Code: Select all

//Pending order deletion following a FLAT or opposite direction signal.
extern bool    DeletePendingOrdersOnFlatSignal=true;
extern bool    DeletePendingOrdersOnOppositeSignal=true;
Scroll down to the grid section and insert the code you copied just above "extern bool UseAtrForGrid=false;"

Scroll back to the code you copied, delete it and insert,
extern bool DeletePendingOrderWhenSignalChanges=false;

Then find "void DoPendingOrdersDeletionAndReplacement(string symbol, int signal)", go to the end of the function and insert this:

Code: Select all

   //Stop/limit orders sent when SendPendingTrades is enabled
   if (SendPendingTrades)
      if (DeletePendingOrderWhenSignalChanges)
         if (PendingTradesTotal > 0)
         {
            //Long pendings
            if (BuyStopOpen || SellStopOpen)
               if (signal != LONG)
               {
                  DeletePendingOrders(symbol);
                  CountOpenTrades(symbol);         
               }//if (signal != LONG)
               
            //Short pendings
            if (SellStopOpen || SellStopOpen)
               if (signal != SHORT)
               {
                  DeletePendingOrders(symbol);
                  CountOpenTrades(symbol);         
               }//if (signal != LONG)
               
         }//if (PendingTradesTotal > 0)
   
: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.
wallywonka
Trader
Posts: 188
Joined: Thu May 12, 2016 7:46 am

Desky. TDesk's trading drone.

Post by wallywonka »

SteveHopwood » Fri Feb 08, 2019 12:14 pm wrote:V 2s is in post 1.

c1borg solved the conundrum of the non-deleted pending orders. He spotted that I had coded only the grid orders, not those generated when SendPendingTrades is enabled.
Hi Steve, I'm using grid orders and it doesn't appear to be deleting pending orders on opposite or flat signals, both are enabled.
Post Reply

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