Desky. TDesk's trading drone.

Desky. TDesk's trading drone.

Postby SteveHopwood » Sat Mar 07, 2020 4:33 pm

thomas1386 » Fri Mar 06, 2020 3:25 pm wrote:Hello Steve,
maybe I am doing something wrong - but it seems to me that deskys "maximum trading pairs safety feature" at version 4 does not work properly. The last version I have used is 3x and it worked as it should. Then I updated to version 4 and noticed that desky opened much more positions than allowed. I have updated to version 4f to use the latest version but it is the same problem - desky opens more orders than allowed.
I am using grid trading with only one grid stop order atr calculated.
Ii is no great problem because I can still use V3x. I just wanted to let you know about this.
I will attach my desky setfile.
Thomas

I had a look through the code and cannot find anything wrong.

The only function that ultimately sends a trade that does not include a max pairs check before sending, is the CT function. Yours is disabled, so the problem is not there.

No idea what is causing your problem.

:xm: :rocket:
Read the effing manual, ok?

Global Prime is the official SHF broker. Click here to sign up for a live account with Global Prime and join the 600+ Steve Hopwood members who choose GP as their broker of choice.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Tommaso (milanese) for all the incredible work he does here.
User avatar
SteveHopwood
 
Posts: 8968
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.

Postby SteveHopwood » Thu Mar 19, 2020 4:31 pm

V 4f is in post 1. This gives us the ability to limit the number of gap filling and rolling grid trades. There are two new inputs in the grid inputs section.

MaxTradesPerPair is the limit for individual pairs. A zero value turns this off.
MaxTradesOverall is the limit for all trades owned by Desky. A zero value turns this off.

Bloop spotters and DIYers, do a search for:
//Max trades filter

to see what I have added.

:xm: :rocket:
Read the effing manual, ok?

Global Prime is the official SHF broker. Click here to sign up for a live account with Global Prime and join the 600+ Steve Hopwood members who choose GP as their broker of choice.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Tommaso (milanese) for all the incredible work he does here.
User avatar
SteveHopwood
 
Posts: 8968
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.

Postby WorldsEnd » Sat Mar 28, 2020 9:05 am

Good morning Steve,
I am trying to combine the concept of your moving day ea with Baluda‘s SS and Peak Hi/Low with TDesk and Desky. Conditions as following:

• buy: price closed above the 480 MA on H1, SS D1 is positive (or above the 1.0 threshold i.e.), price is not in the upper peak range (upper 20% i.e.)
• sell: vice versa

If conditions are met, we place a stop order 10 (15 or 20) pips above last candle close (for a sell below of course).

We delete the stop order when price closes below the 480 MA again (possible reversal situation)

Exit condition: tbd ... my thoughts: stop orders are placed with a 300 pips emergency SL but without a fixed TP. We use an opposite MA cross as well as an opposite Peak to close running as well as stop orders. Furthermore I‘d suggest a jumping stop every 100 pips so that we are break even after the first 100 pips. Thereafter we bank 100 pips after every jump.

I worked out a TDesk setup which gives the necessary signals and I got Desky placing the orders as supposed. However, there‘s one essential condition I wasn‘t able to get managed by Desky thus far. The closure of pending trades when price closed below the 480 MA is not working as I thought it would. It is working for running orders though. I‘ve read the manual of TDesk and Desky a couple of times and went through the many setting of Desky but I can‘t find a possible solution for this problem.

I can post my .set files if this is of any help for you. Just let me know.
WorldsEnd
 
Posts: 61
Joined: Fri Aug 29, 2014 7:36 pm

Desky. TDesk's trading drone.

Postby SteveHopwood » Sat Mar 28, 2020 9:07 pm

WorldsEnd » Sat Mar 28, 2020 9:05 am wrote:Good morning Steve,
I am trying to combine the concept of your moving day ea with Baluda‘s SS and Peak Hi/Low with TDesk and Desky. Conditions as following:

• buy: price closed above the 480 MA on H1, SS D1 is positive (or above the 1.0 threshold i.e.), price is not in the upper peak range (upper 20% i.e.)
• sell: vice versa

If conditions are met, we place a stop order 10 (15 or 20) pips above last candle close (for a sell below of course).

We delete the stop order when price closes below the 480 MA again (possible reversal situation)

Exit condition: tbd ... my thoughts: stop orders are placed with a 300 pips emergency SL but without a fixed TP. We use an opposite MA cross as well as an opposite Peak to close running as well as stop orders. Furthermore I‘d suggest a jumping stop every 100 pips so that we are break even after the first 100 pips. Thereafter we bank 100 pips after every jump.

I worked out a TDesk setup which gives the necessary signals and I got Desky placing the orders as supposed. However, there‘s one essential condition I wasn‘t able to get managed by Desky thus far. The closure of pending trades when price closed below the 480 MA is not working as I thought it would. It is working for running orders though. I‘ve read the manual of TDesk and Desky a couple of times and went through the many setting of Desky but I can‘t find a possible solution for this problem.

I can post my .set files if this is of any help for you. Just let me know.

This is one of those circumstances that I did not forsee. I know what the problem is.

Assuming such behaviour is desired, then Desky will close all buy and sell market trades following an EXIT or FLAT signal. I have looked at the code. He is not currently programmed to delete outstanding pending orders. I just need to think about how to solve this without inviting LUC around for coffee.

More tomorrow. I am not short of time to think at the mo. :lol:

:xm: :rocket:
Read the effing manual, ok?

Global Prime is the official SHF broker. Click here to sign up for a live account with Global Prime and join the 600+ Steve Hopwood members who choose GP as their broker of choice.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Tommaso (milanese) for all the incredible work he does here.
User avatar
SteveHopwood
 
Posts: 8968
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.

Postby SteveHopwood » Sun Mar 29, 2020 10:42 am

V 4h is in post 1. The solution to the non-deletion of pending trades appears simple, so 4h should fix this.

There is a simple DIY. Go to these two functions:
void doFlatSignalClosure(string symbol, int pairIndex, int signal)
void doExitSignalClosure(string symbol, int pairIndex, int signal)

You will find these lines of code in each function:
closeAllTrades(symbol, OP_BUY);
closeAllTrades(symbol, OP_SELL);

OP_BUY and OP_SELL both need changing to allTrades so all four lines of code across the two functions should become:
closeAllTrades(symbol, allTrades);

Sing out if the fix fails.

:xm: :rocket:
Read the effing manual, ok?

Global Prime is the official SHF broker. Click here to sign up for a live account with Global Prime and join the 600+ Steve Hopwood members who choose GP as their broker of choice.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Tommaso (milanese) for all the incredible work he does here.
User avatar
SteveHopwood
 
Posts: 8968
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.

Postby WorldsEnd » Sun Mar 29, 2020 11:45 am

SteveHopwood » 29 Mar 2020, 12:42 wrote:V 4h is in post 1. The solution to the non-deletion of pending trades appears simple, so 4h should fix this.

There is a simple DIY. Go to these two functions:
void doFlatSignalClosure(string symbol, int pairIndex, int signal)
void doExitSignalClosure(string symbol, int pairIndex, int signal)

You will find these lines of code in each function:
closeAllTrades(symbol, OP_BUY);
closeAllTrades(symbol, OP_SELL);

OP_BUY and OP_SELL both need changing to allTrades so all four lines of code across the two functions should become:
closeAllTrades(symbol, allTrades);

Sing out if the fix fails.

:xm: :rocket:


Thx for pointing this out. Will do the change and try it out tomorrow when we enter the european trading times :good:
WorldsEnd
 
Posts: 61
Joined: Fri Aug 29, 2014 7:36 pm

Desky. TDesk's trading drone.

Postby WorldsEnd » Mon Mar 30, 2020 8:13 am

SteveHopwood » 29 Mar 2020, 12:42 wrote:
Sing out if the fix fails.

:xm: :rocket:


:|

Sorry to say but it looks like the fix failed. The exit condition is defined for TDesk and Desky is working properly for market trades but not for pending ones. Those get placed correctly but not deleted when price closed opposite to the pending trade.
WorldsEnd
 
Posts: 61
Joined: Fri Aug 29, 2014 7:36 pm

Desky. TDesk's trading drone.

Postby SteveHopwood » Mon Mar 30, 2020 11:20 am

WorldsEnd » Mon Mar 30, 2020 8:13 am wrote:
:|

Sorry to say but it looks like the fix failed. The exit condition is defined for TDesk and Desky is working properly for market trades but not for pending ones. Those get placed correctly but not deleted when price closed opposite to the pending trade.

Try 4i in post 1.

I have re-coded void closeAllTrades(string symbol, int type), so DIYers, copy this over the top of the existing function:
Code: [Select all]
 Please Login or Register to see this content
<


I have added a function to delete orphaned pending orders, so insert this above OnTimer():
Code: [Select all]
 Please Login or Register to see this content
<


To add the call to the new function, search for:
}//if (closeOpenOnEXITSignal)

Add the call underneath:
Code: [Select all]
 Please Login or Register to see this content
<


Then hope for the best, as the messenger occasionally gets shot.

:xm: :rocket:
Read the effing manual, ok?

Global Prime is the official SHF broker. Click here to sign up for a live account with Global Prime and join the 600+ Steve Hopwood members who choose GP as their broker of choice.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Tommaso (milanese) for all the incredible work he does here.
User avatar
SteveHopwood
 
Posts: 8968
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.

Postby WorldsEnd » Mon Mar 30, 2020 10:45 pm

Thx Steve for all your effort in solving my issue. I studied my screen all day long in order to see if your new fix worked out. I am not a 100% sure but as far as I can tell it does not. But, at the end of the day I am pretty sure that this has nothing to do with your work or desky.
I read this post by Thomas again and stumbled about one sentence.

“This list and logic input let you define which signals will force the trading EA to exit from all positions if the signals are opposite to the net lot size of all open positions.“

Might TDesk be the problem in the end? Am I right to assume that TDesk does not recognize pending trades? Does it need a market trade (a net lot size) to produce an exit signal? So for my case ... as long as there‘s just a pending trade, TDesk does not produce an exit signal and therefore Desky is unable to close the pending order? Does this sound reasonable?

Would love to read a statement from Thomas. He should be able to tell if there‘s something I can do. Or provide a coding solution, a fix or whatsoever.
WorldsEnd
 
Posts: 61
Joined: Fri Aug 29, 2014 7:36 pm

Desky. TDesk's trading drone.

Postby tomele » Wed Apr 01, 2020 8:18 am

SteveHopwood wrote:Might TDesk be the problem in the end? Am I right to assume that TDesk does not recognize pending trades? Does it need a market trade (a net lot size) to produce an exit signal? So for my case ... as long as there‘s just a pending trade, TDesk does not produce an exit signal and therefore Desky is unable to close the pending order? Does this sound reasonable?

Would love to read a statement from Thomas. He should be able to tell if there‘s something I can do. Or provide a coding solution, a fix or whatsoever.


You can very easily check whether it is a TDesk or Desky issue. Just observe the SuperSignal column. Does it show an EXIT signal or not?

Cheers
Thomas
Happy pippin, Thomas ;)

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)

Join the new era of EA testing: FXTestify
Keep the coder going: Donate
User avatar
tomele
 
Posts: 1081
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

PreviousNext

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

Who is online

Users browsing this forum: No registered users and 0 guests