Hopelessly confused by TDesk or Desky? Ask here.

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.

Hopelessly confused by TDesk or Desky? Ask here.

Post by SteveHopwood »

c1borg » Thu Dec 06, 2018 5:54 pm wrote:
I need help still failing to get pending trades to work even after the help kindly provided by Leon :arrrg:

I am using the settings attached using V2i. I use this setup on other demos and everything is working as expected with send immediate trades set to true and the grid trading off. However when I turn the grid on and the immediate trades off nothing happens. I have set an indicator which is always going to send a signal and no pending trades appear? I must be doing something stupid :x



Does anybody use pending trades if so can you kindly send me your setfile preferably for V2i, ive come to a deadend :smile:
You will be glad to know that you were not being a dope.

Looking at the problem with fresh eyes, I spotted it immediately.

The variable 'result' is declared at the top of the function, and initialised to 'false'. It is only reset to 'true' if the immediate market trade is successful, as in:

Code: Select all

                     //Immediate market trade
                     if (SendImmediateMarketTrade)
                        result = LookForTradingOpportunities(symbol, pairIndex, OP_BUY);
This means that the, "if (result)" conditional in the grid block prevents the grid being sent. We do not get so many visits from LUC these days, but this was one.

Code: Select all

                     if (UseGridTrading)
                        if (result)
                        {
                           if (TypeOfGrid == Stop || TypeOfGrid == Both)
                           {
                              SendBuyGrid(symbol, OP_BUYSTOP, ask, Lot );
                           }//if (TypeOfGrid == OP_BUYSTOP || TypeOfGrid == Both)
                           
                           if (TypeOfGrid == Limit || TypeOfGrid == Both)
                           {
                              SendBuyGrid(symbol, OP_BUYLIMIT, ask, Lot );
                           }//if (TypeOfGrid == OP_BUYSTOP || TypeOfGrid == Both)
                           
                        }//if (result)
I will include the solution in the next release coming this weekend. It is to go to, "bool result = false;" at the top of OnTimer() and add this underneath:

Code: Select all

   if (!SendImmediateMarketTrade)
      result = true;//To allow grid trading if SendImmediateMarketTrade is 'false'.
: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.
Holbroom
Trader
Posts: 21
Joined: Tue Sep 27, 2016 11:02 am

Hopelessly confused by TDesk or Desky? Ask here.

Post by Holbroom »

Thank you Thomas, I got my calculations wrong, appreciate you explaining this in detail.

Does TDesk require us to input the the minus sign (-0.50) in to the ExitThreshold value field?
User avatar
tomele
Administrator
Posts: 1208
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Hopelessly confused by TDesk or Desky? Ask here.

Post by tomele »

Holbroom » 08 Dec 2018, 12:28 wrote:Thank you Thomas, I got my calculations wrong, appreciate you explaining this in detail.

Does TDesk require us to input the the minus sign (-0.50) in to the ExitThreshold value field?
That question suggests you still don't have the picture.

If you want to exit on the signal's opposite side, you of course have to enter a minus sign. If you want to exit on the signal's side (for instance at +25 after an entry of +75), you don't enter a minus sign.

Assume 4 signals and you have entered a position because all 4 agreed (Entry thresh 100).

Here are some sample thresholds to exit:

3 agree, 1 is flat = +75
2 agree, 2 are flat = +50
1 agrees, 3 are flat = +25
1 agrees, 1 contradicts, 2 are flat = 0
1 agrees, two contradict, 1 is flat = -25
2 are flat, two contradict = -50
1 agrees, 3 contradict = -50
1 is flat, 3 contradict= -75
4 contradict = -100

and so on.

Capiche?
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
pacinvest
Trader
Posts: 150
Joined: Tue May 15, 2012 10:24 am
Location: Whangarei, New Zealand

Hopelessly confused by TDesk or Desky? Ask here.

Post by pacinvest »

Hi Team

Steve the counter trend scalp is interesting hope to test this week. But I think it will get killed in certain PA conditions. Will be great if I am horribly wrong about that.

I am having some fun with a hedging idea to work with Peaky. This is an autotrade idea. I want Peaky (trading timeframe) to guide the direction of trading. My main trades will close on full opposite signal once the Peaky swings unfold and my other indicators are supporting by all reversing. Other indys are RSI cross TD V2 (26 slow, 2 fast, 1 time frame above trading time frame) and HGI (trading timeframe) with a lower TF MA to help entries. Thanks goes to Leon for this approach. I am going to refer to these other indicators as my 'main' indys.

Here's the hedge idea. I want to hedge when my main indicators reverse but of course often Peaky is not flinching and sticks to its guns, so this is not an opposite signal and not supported as a Hedge entry option currently. I will call this a correction, (lower time frame wave). When the correction completes its little run and we return to the Peaky direction my original trade is sitting there ready to resume its run with Peaky and I want my hedge to close in profit, taking those pips off the table as we go. This pattern may repeat 3-4 times for each Peaky swing. To make this happen we could have an option to have the hedge open on a flat signal which I calculate to reflect my main indys reversing. The hedge closes when the overall signal resumes which is how it is currently coded, so that part is already there. Essentially I am looking to let my main trades run with the Peaky wave and hedge the corrections or pullbacks. Another way to do this is to have Desky ignore Peaky for the Hedge entry. I will stop there if this idea is worth pursuing you will know how best to code it. If you go for this there will be many possible hedge strategies opening up, as a result of TDesk magic.

Thanks for the continued efforts, Desky is getting there......
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.

Hopelessly confused by TDesk or Desky? Ask here.

Post by SteveHopwood »

pacinvest » Sun Dec 09, 2018 8:51 am wrote:Hi Team

Steve the counter trend scalp is interesting hope to test this week. But I think it will get killed in certain PA conditions. Will be great if I am horribly wrong about that.

I am having some fun with a hedging idea to work with Peaky. This is an autotrade idea. I want Peaky (trading timeframe) to guide the direction of trading. My main trades will close on full opposite signal once the Peaky swings unfold and my other indicators are supporting by all reversing. Other indys are RSI cross TD V2 (26 slow, 2 fast, 1 time frame above trading time frame) and HGI (trading timeframe) with a lower TF MA to help entries. Thanks goes to Leon for this approach. I am going to refer to these other indicators as my 'main' indys.

Here's the hedge idea. I want to hedge when my main indicators reverse but of course often Peaky is not flinching and sticks to its guns, so this is not an opposite signal and not supported as a Hedge entry option currently. I will call this a correction, (lower time frame wave). When the correction completes its little run and we return to the Peaky direction my original trade is sitting there ready to resume its run with Peaky and I want my hedge to close in profit, taking those pips off the table as we go. This pattern may repeat 3-4 times for each Peaky swing. To make this happen we could have an option to have the hedge open on a flat signal which I calculate to reflect my main indys reversing. The hedge closes when the overall signal resumes which is how it is currently coded, so that part is already there. Essentially I am looking to let my main trades run with the Peaky wave and hedge the corrections or pullbacks. Another way to do this is to have Desky ignore Peaky for the Hedge entry. I will stop there if this idea is worth pursuing you will know how best to code it. If you go for this there will be many possible hedge strategies opening up, as a result of TDesk magic.

Thanks for the continued efforts, Desky is getting there......
Great idea. Easy to code. I will include it in my release later today.

: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

Hopelessly confused by TDesk or Desky? Ask here.

Post by c1borg »

Thanks for the update Steve :hi: I have a few questions I have updated to version 2k and the display now says
Capture.PNG
It used to display the basket target, in my case 1% of the equity and the current profit. What is the cash and pips target referring to? I notice global basket take profit is active as expected, however market trades count is 0 when I have active trades. Perhaps it is because the market is not open yet, and this behaviour is correct?
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.

Hopelessly confused by TDesk or Desky? Ask here.

Post by SteveHopwood »

c1borg » Sun Dec 09, 2018 8:08 pm wrote:Thanks for the update Steve :hi: I have a few questions I have updated to version 2k and the display now says



It used to display the basket target, in my case 1% of the equity and the current profit. What is the cash and pips target referring to? I notice global basket take profit is active as expected, however market trades count is 0 when I have active trades. Perhaps it is because the market is not open yet, and this behaviour is correct?
No idea. Let's sort it out next week. For now, just assume that closed markets fuck everything up. They usually do.

: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.
ppaulius1
Posts: 5
Joined: Wed Aug 31, 2016 4:17 pm
Location: Lithuania

Hopelessly confused by TDesk or Desky? Ask here.

Post by ppaulius1 »

Hello guys,

I spend a few days for studying all topics in a forum about this wonderful tool. Now I'm trying to set it up according my needs.
I have a latest TDesk V4.0 version and 'Baluda SuperSlope TD V2' and 'MTF HGI Bars TD V2' indicators which are set for a three different time frames. Signals are detected by TDesk, but I can't get those in a separate columns in a TDesk UI:
TDesk.JPG
Both indicators and EA are loaded by Empty4 without any errors. I checked all inputs of TDesk, tried to delete 'mqlcache.dat' files from Experts/Indicators folders, tried to recompile indicators but it still doesn't work correctly. I tried two different Empty4 platforms from different brokers and got the same issue.

Do you have any ideas what could I miss?

Thank you very much for a reply in advance.

Happy and profitable New Year for all of you!

BR,
Paulius
You do not have the required permissions to view the files attached to this post.
User avatar
tomele
Administrator
Posts: 1208
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Hopelessly confused by TDesk or Desky? Ask here.

Post by tomele »

Click on one of the cyan signal column headers or set HideSignalDetails=false.

Cheers
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
ppaulius1
Posts: 5
Joined: Wed Aug 31, 2016 4:17 pm
Location: Lithuania

Hopelessly confused by TDesk or Desky? Ask here.

Post by ppaulius1 »

Shame on me... :oops:

Thank you very much Thomas!
Post Reply

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