Desky. TDesk's trading drone.

Post Reply
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.

Bloop alert

Post by SteveHopwood »

David has pm'd again after spotting some more logic bloops - fixed in post 1.

The easiest DIY is to go to line 3411: if (signal == LONG)
There you will see two blocks of code ending at line 3443: }//if (signal == SHORT)

All the instances of: OP_BUY and BuyClosureFailure: OP_SELL and SellClosureFailure are in the wrong blocks. Either change them all manually or copy this over the top of the existing code:

Code: Select all

      //Opposite signal closure
      if (signal == LONG)
      {
         if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes)
            BuySignal = true;
         if (CloseOnOppositeSignal)
         {
            SellClosureFailure = false;
            CloseAllTrades(symbol, OP_SELL);
            if (ForceTradeClosure)
            {
               SellClosureFailure = true;
               pairIndex--;
               continue;
            }//if (ForceTradeClosure)
         }//if (CloseOnOppositeSignal)
      }//if (signal == LONG)
      
      if (signal == SHORT)
      {
         if ((TimeLocal() - TDeskTimes[pairIndex]) / 60 <= MaxSignalAgeMinutes)
            SellSignal = true;
         if (CloseOnOppositeSignal)
         {
            BuyClosureFailure = false;
            CloseAllTrades(symbol, OP_BUY);
            if (ForceTradeClosure)
            {
               BuyClosureFailure = true;
               pairIndex--;
               continue;
            }//if (ForceTradeClosure)
         }//if (CloseOnOppositeSignal)
      }//if (signal == SHORT)
Thanks again David. :clap: :clap: :clap: :clap: :clap:

: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.
davista
Posts: 2
Joined: Sun May 03, 2015 11:34 am

Post by davista »

SteveHopwood » Mon Oct 15, 2018 9:54 am wrote:David has pm'd again after spotting some more logic bloops - fixed in post 1.

...

Thanks again David. :clap: :clap: :clap: :clap: :clap:

:xm: :rocket:
Happy to help. I've been a silent lurker for a while now, but hopefully I can now finally make some useful contributions to SHF :)
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 »

Bear in mind folks if you did it yourself after David's post, that there were more bloops in that section of code than he noticed. The logic was entirely the wrong way around. Go back to mine a couple of posts higher up than this one and make the extra changes.

: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 I have not added hedging to Desky. I am thinking HedgeOnOppositeDirectionSignal. I will add it as soon as I can.

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

Recovery is not working properly folks. Turn it off until I can sort it out.

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

no urgency but can I add a request for % profit per day basket profit closure as used in AwesomeSS :youknow:
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 am putting this here because I know that a lot of SHF members are reading this thread.

A number of major thread runners are feeling the sort of frustration that I often felt many years ago, before I developed my robust way of dealing with dimwits.

They are mostly gentle souls, unwilling to press the nuclear button.

I am not a gentle soul unless you are a teen. I doubt there are many teens here, so most of you are in danger of a ban from me. There are too many idiotic posts from lazy and stupid people appearing at SHF these days.

So I give everyone this fair warning: post lazily and/or stupidly and I will ban you unless it is a thread where you are allowed to be as thick as you like - and I make it perfectly clear in post 1 when this is allowed. Beginners' threads apart, I do not care whose thread it is. I am on a dimwit-banning warpath. There will be no warning and the security software that Tommaso has put in place will prevent you from re-joining.

I remind people of the SHF ethos. SHF is a meritocracy, not a democracy. Got nothing useful to say? Don't say it.

In doubt about whether to post or not? Stay quiet. Or ask in the beginners' threads assigned to you.

Take no comfort from the usual sign off that I am about to add. I am not joking.

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

c1borg » Tue Oct 16, 2018 8:32 pm wrote:no urgency but can I add a request for % profit per day basket profit closure as used in AwesomeSS :youknow:
Yes you can and I will provide it. You might have to nudge me from time to time. You have earned the right to do so.

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

DIY fix

Post by SteveHopwood »

A quick DIY fix folks, for the grid traders. I have been tearing my hair out this morning wondering why the stop and limit orders were being sent at the same price.

Go to void SendBuyGrid(string symbol, int type, double price, double lot) and the cause will probably leap out at you immediately. There are four instances of "Digits" which is the constant for the chart symbol. These need replacing by, "digits" which is the variable that holds the digits count for the symbol being traded.

Peasants' fix coming when I have worked out what is wrong with Recovery.

:arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg:
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 1h is in post 1. The fix for the stop and limit order price thingy has worked. 1h also attempts a fix for the Recovery thingy.

DIYers, there are two variables that tell Desky that the pair is in recovery - BuysInRecovery and SellsInRecovery. Once set, they were never reset, so Desky regarded all pairs as needing recovery.

Do a search for, "if (MarketBuysCount >= TradesToStartLookingForRecovery)//Minimum trades to constitute Recovery" and insert this directly above:

Code: Select all

      BuysInRecovery = false;
      SellsInRecovery = false;
      
Include the space and our line numbers are still the same.

: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.
Post Reply

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