Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 529 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
HTPhasor's return value, and suggestions for the manual #443108
07/09/14 14:20
07/09/14 14:20
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
returns a var
but what is the value? The manual doesn't say.
same with HTSine.

Also, I feel that MedPrice, TypPrice, and WCLPrice belong on the "price" page of the manual rather than the Indicators page.

Re: HTPhasor's return value, and suggestions for the manual [Re: GPEngine] #443124
07/09/14 18:26
07/09/14 18:26
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
I'm afraid I can't help much with HTPhasor - my guess is as good as yours. The HT indicators are from the "Rocket Science" book by Ehlers. It would be difficult to interpret them without the context of that book.

Re: HTPhasor's return value, and suggestions for the manual [Re: jcl] #443217
07/11/14 05:18
07/11/14 05:18
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Does the source code for HTSine, etc., live somewhere I can see? On p. 125 he adjusts one of the WMA periods. I would like to try that.

Additionally the manual claims that HTDcPeriod is slightly less accurate than the DominantPeriod function. What data do you have that supports this claim? Can you share it?

Last edited by GPEngine; 07/11/14 05:21.
Re: HTPhasor's return value, and suggestions for the manual [Re: GPEngine] #443222
07/11/14 06:27
07/11/14 06:27
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Yes, the source of all indicators is online, and linked on the indicators page.

I've tested HTDcPeriod with chirps and found it inferior to DominantPeriod. Ehlers uses a different method in his newest book, based on an autocorrelation spectrum. That one I have not tested yet.

Re: HTPhasor's return value, and suggestions for the manual [Re: jcl] #443237
07/11/14 14:06
07/11/14 14:06
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
I meant the source code in lite-c in Zorro framework
I have the book, so I have the source code in EasyLanguage. I'm 'bout to translate it, I guess.

Re: HTPhasor's return value, and suggestions for the manual [Re: GPEngine] #443240
07/11/14 14:39
07/11/14 14:39
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
The source code is C++, not lite-C.

Re: HTPhasor's return value, and suggestions for the manual [Re: jcl] #443267
07/12/14 04:41
07/12/14 04:41
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Das ist komplizierter als ich dachte. laugh

Re: HTPhasor's return value, and suggestions for the manual [Re: GPEngine] #443295
07/12/14 19:10
07/12/14 19:10
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
I found ta_HT_DCPERIOD.c and ta_HT_DCPHASE.c, etc.
I see a couple problems

1.
In ta_HT_DCPHASE, on line 427 is
else if( tempReal <= 0.01 )
should be
else if( tempReal <= 0.001 )
ref Ehlers p. 122

2.
In several places, a comment says "idx" is used to iterate for up to 50 of the last value of smoothPrice. By code inspection, that's not true. What it actually does is rotate through last 50 values, starting over at end of the smoothPrice array each time 0 is reached. Anyway, that's not in the book.
Code:
/* idx is used to iterate for up to 50 of the last
       * value of smoothPrice.
       */
      idx = smoothPrice_Idx;
      for( i=0; i < DCPeriodInt; i++ )
      {
         tempReal  = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt;
         tempReal2 = smoothPrice[idx];
         realPart += std_sin(tempReal)*tempReal2;
         imagPart += std_cos(tempReal)*tempReal2;
         if( idx == 0 )
            idx = SMOOTH_PRICE_SIZE-1;
         else
            idx--;
      }


Since that code smells funny, I look a little closer. whats this... RealPart should accumulate cos(x / period), and the ImagPart should accumulate sin(x / period). I think the coder got sin & cos confused. ref Ehlers p. 122

That fragment is untouched since the first check-in http://sourceforge.net/p/ta-lib/code/139/

I realize that this is not your code. But I thought you might be interested anyway. so you don't blame ehlers algos for what may actually be an implementation issue (or three).

Re: HTPhasor's return value, and suggestions for the manual [Re: GPEngine] #443357
07/14/14 14:10
07/14/14 14:10
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Thanks a lot, this is an interesting discovery. I have never verified the ta-lib source, but the HTDcPeriod returned periods that looked correct, althoug less precise and more noise sensitive than DominantPeriod.

I'll check and then possibly remove the HT functions from the indicator list in the documentation.

Re: HTPhasor's return value, and suggestions for the manual [Re: jcl] #443759
07/24/14 04:54
07/24/14 04:54
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
I found another transcription error.

http://sourceforge.net/p/ta-lib/code/HEAD/tree/trunk/ta-lib/c/src/ta_func/ta_HT_TRENDMODE.c#l446
Code:
else if( tempReal <= 0.01 )
      {
         if( realPart < 0.0 )
            DCPhase -= 90.0;
         else if( realPart > 0.0 )
            DCPhase += 90.0;
      }



That is supposed to say
Code:
else if( tempReal <= 0.01 )
      {
         if( imagPart < 0.0 )
            DCPhase -= 90.0;
         else if( imagPart > 0.0 )
            DCPhase += 90.0;
      }


Since the EasyLanguage code on p102 says
Code:
If AbsValue(RealPart) <= 0.001 then DCPhase = 90 * Sign(ImagPart);


(not realPart).
Sloppy!

Page 1 of 2 1 2

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1