TradingView
cheatcountry
2020년 6월 3일 오후 5시 53분

Ehlers Sinewave Indicator [CC] 

Apple Inc.NASDAQ

설명

The Sinewave Indicator was created by John Ehlers (Rocket Science For Traders pgs 97-99) and this is a few indicators in one. Simply put it is a leading indicator which you don't see too many of those these days. If the blue line crosses over the red line then within the next few bars the price will start an uptrend and if the blue line crosses below the red line then in the next few bars it will start a downtrend. I have also included an immediate buy and sell signal on the 0 line which is green when you should buy and red when you should sell.

Let me know if you would like to see any other scripts or if you want something custom done!

릴리즈 노트

made changes to fix errors in the source book

릴리즈 노트

fixed a typo

릴리즈 노트

fixed a typo

릴리즈 노트

Updated to v5 and fixed error reported by @kamicopia

릴리즈 노트

Fixed an issue with degrees not being converted to radians
코멘트
sal157011
Please check lines 46 to 50 and the errata. Check also my Sine Wave if you wish. " tradingview.com/script/cytDBHIC-Sine-Wave/ "
cheatcountry
@sal157011, those were changed already to match the errata you sent. what is the issue?
daytraderph
your scripts are nice and having solid re-search. if you don't mind can i request you to make some study based on adxcellence book also .
cheatcountry
@daytraderph, yes just send me a private message
sal157011
The code on the Book Rocket Science for traders and other books by John Ehlers have some errors.
Once he published an errata on his site Mesasoftware, but is not available anymore. Here is the errata on what concerns the sine wave.

pages 98 and 102 and 116 and 120 & 121: the code should be corrected to be:
....... RealPart = RealPart + Sine(360*count/DCPeriod)*(SmoothPrice[count]);
....... ImagPart = ImagPart + Cosine(360*count/DCPeriod)*(SmoothPrice[count]);
....... If AbsValue(ImagPart) > 0 then DCPhase = Arctangent(RealPart/ImagPart);
....... If AbsValue(ImagPart) <= .001 then DCPhase = DCPhase + 90*Sign(RealPart):

If you wish check my script "Sine Wave" for what I think is the correct version of sine wave.
cheatcountry
@sal157011, do you happen to have a copy of the errata?
sal157011
@cheatcountry, Unfortunately I only have the first version of the errata, there was another more recent version but I didn't save it. Here it is what I've got: Note: this comments editor turns square brackets into round brackets.
------------------------------
As many times as the book was editied, some errors still got through. Here are the new corrections:
page 25: the correct equation is WMA = (4*Price + 3*Price[1] + 2*Price[2] + Price[3])/10;

page 56: the lag of the Hilbert Transform is 7 bars.

page 80: Figure 8.1 (a) and (b) are reversed.

pages 98 and 102 and 116 and 120 & 121: the code should be corrected to be:
....... RealPart = RealPart + Sine(360*count/DCPeriod)*(SmoothPrice[count]);
....... ImagPart = ImagPart + Cosine(360*count/DCPeriod)*(SmoothPrice[count]);
....... If AbsValue(ImagPart) > 0 then DCPhase = Arctangent(RealPart/ImagPart);
....... If AbsValue(ImagPart) <= .001 then DCPhase = DCPhase + 90*Sign(RealPart):
page 175: Figure 16.3 The fourth line from the end should corrected to be:
....... > Low[1] and Close < High - (High -
page 183: Figure 17.1. The word "Speed" should be replaced with "FastLimit"
page 212: Figure 20.4. The code should be corrected to be:
....... Trigger = (4*Predict + 3*Predict[1] + 2*Predict[2] + Predict[3]) / 10;
cheatcountry
@sal157011, I made those changes. Can you send me via pm the errata file you have?
Midhunsekhar87
Good idea.
cheatcountry
@Midhunsekhar87, thank you!
더보기