Desky. TDesk's trading drone.

Post Reply
echoman01
Trader
Posts: 45
Joined: Thu Feb 20, 2014 2:11 pm

Desky. TDesk's trading drone.

Post by echoman01 »

Dear Steve, I said a silent prayer to the gods of FX trading for this very feature added to Desky not long ago.

To paraphrase: I am as an amoeba compared to you coding geniuses.

Thankyou, :yahoo:
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 »

echoman01 » Mon Nov 12, 2018 8:03 pm wrote:Dear Steve, I said a silent prayer to the gods of FX trading for this very feature added to Desky not long ago.

To paraphrase: I am as an amoeba compared to you coding geniuses.

Thankyou, :yahoo:
Someone asked publically for it. It may have been you - don't know. It seemed like a good idea at the time and I never forgot it. It just took a while to get around to 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.
BarraCoda
Posts: 4
Joined: Thu Oct 26, 2017 7:00 pm

Desky. TDesk's trading drone.

Post by BarraCoda »

Hi Steve,

desky shows me the doubled amount of trades open. For example: i have 8 trades open, but desky shows 16.

I´ve decided to look in the code before beeing an idiot and get banned :shock:
I don´t know how to live on without SHF :smile:

I hope i found the feature that tells desky to take every trade in double:

This goes from line 992 in the newest release:

Code: Select all

      ArrayResize(GlobalTickets, GlobalTradesTotal + 1);
      GlobalTickets[GlobalTradesTotal] = OrderTicket();
      GlobalTradesTotal++;
      

      //We are only concerned with market trades here
      if (OrderType() < 2)
      {
         TotalCashUpl+= OrderProfit() + OrderSwap() + OrderCommission();
         pips = (int) CalculateTradeProfitInPips(OrderType());
         TotalPipsUpl+= pips;
         GlobalTradesTotal+= 1;
      }//if (OrderType() < 2)
I just don´t understand why we add twice to the GlobalTradesTotal variable. Once if we get a ticket which is owned by the EA, and twice when this ticket is a market trade. So we do have the same ticket twice in the GlobalTickets-array.

Am i right or am i just too stupid to understand your work?

btw TDesk and Desky are really a exciting new way to trade and plug'n'play EAs! Really nice! :clap:
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 »

BarraCoda » Tue Nov 13, 2018 4:58 pm wrote:Hi Steve,

desky shows me the doubled amount of trades open. For example: i have 8 trades open, but desky shows 16.

I´ve decided to look in the code before beeing an idiot and get banned :shock:
I don´t know how to live on without SHF :smile:

I hope i found the feature that tells desky to take every trade in double:

This goes from line 992 in the newest release:

Code: Select all

      ArrayResize(GlobalTickets, GlobalTradesTotal + 1);
      GlobalTickets[GlobalTradesTotal] = OrderTicket();
      GlobalTradesTotal++;
      

      //We are only concerned with market trades here
      if (OrderType() < 2)
      {
         TotalCashUpl+= OrderProfit() + OrderSwap() + OrderCommission();
         pips = (int) CalculateTradeProfitInPips(OrderType());
         TotalPipsUpl+= pips;
         GlobalTradesTotal+= 1;
      }//if (OrderType() < 2)
I just don´t understand why we add twice to the GlobalTradesTotal variable. Once if we get a ticket which is owned by the EA, and twice when this ticket is a market trade. So we do have the same ticket twice in the GlobalTickets-array.

Am i right or am i just too stupid to understand your work?

btw TDesk and Desky are really a exciting new way to trade and plug'n'play EAs! Really nice! :clap:
Thanks for this. :clap: :clap: :clap: GlobalTradesTotal+= 1; was probably meant to be something different and I did not notice that I selected the wrong auto-complete.

I will upload a fix later.

: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.
4xtn
Trader
Posts: 26
Joined: Mon Aug 27, 2012 10:32 pm
Location: Dublin, Ireland

Desky. TDesk's trading drone.

Post by 4xtn »

Has anyone tried hedging? It appears there is a bug somewhere as trades are closed within seconds :/
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 2c is in post 1, with the fix for the bloop that BarraCoda spotted.

DIYers, do a search for, "GlobalTradesTotal+= 1;" and delete that line of code.

Turn off hedging for now. It will have to wait until I have a trade that needs it and have the time to sort it out - unlikely this 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
pacinvest
Trader
Posts: 150
Joined: Tue May 15, 2012 10:24 am
Location: Whangarei, New Zealand

Desky. TDesk's trading drone.

Post by pacinvest »

Hopefully this is helpful Steve.

Desky v2b: in trade management section. I am finding Break even set by itself works, jumping stop set causes EA to stop working, trailing stop is trying to set stops but returns error message 'invalid stops'. This was observed across two platforms one on my laptop and one on VPS and seems to be consistent, i.e. not isolated error.

cheers
vince
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 »

pacinvest » Thu Nov 15, 2018 6:28 pm wrote:Hopefully this is helpful Steve.

Desky v2b: in trade management section. I am finding Break even set by itself works, jumping stop set causes EA to stop working, trailing stop is trying to set stops but returns error message 'invalid stops'. This was observed across two platforms one on my laptop and one on VPS and seems to be consistent, i.e. not isolated error.

cheers
vince
Thanks Vince. I will look into 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
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 »

pacinvest » Thu Nov 15, 2018 6:28 pm wrote:Hopefully this is helpful Steve.

Desky v2b: in trade management section. I am finding Break even set by itself works, jumping stop set causes EA to stop working, trailing stop is trying to set stops but returns error message 'invalid stops'. This was observed across two platforms one on my laptop and one on VPS and seems to be consistent, i.e. not isolated error.

cheers
vince
2d is in post 1, with what I think are fixes.

Or: go to OnInit() and add these two lines of variables initialisations:
JumpingStopPips = JumpingStopTargetPips;
TrailingStopPips = TrailingStopTargetPips;

I have also added a few more calls to the function that populates variables such as ask, bid, factor etc. Do a search for: "//Security check" and add this just underneath the code snippet that makes sure the trade is still open:
GetBasics(OrderSymbol() );

There are 4 instances of "//Security check"

Leave hedging turned off for now folks. I doubt I will be able to sort it out this 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
Vokin
Trader
Posts: 51
Joined: Tue Dec 06, 2011 4:31 pm

Desky. TDesk's trading drone.

Post by Vokin »

Hi Steve,
there is mismatch in basket sum in EA and account. See pict.
Maybe that's why EA closed the basket on a different TP than it was set up (It has happened to me twice).
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.”