TradingView
sal157011
12 יוני 2020 10:11

Cybernetic Sine Wave 

Apple Inc.NASDAQ

תיאור

This is John F. Ehlers "Sine Wave Indicator" on the book "Cybernetic Analysis for Stocks and Futures".
When red crosses under blue there is a resistance and the price should fall and when red crosses over blue there is a support and the price should rise, but, the market is always right,
if instead of turning down on the resistance it surpasses it there is a trend up, if instead of turning up on the the support it falls through it there is a trend down.
תגובות
ssmb78
Hello sal157011, thank you for sharing such a usedul indicator. In fact, using it along with your Cybernetic Sine Wave over can give amazing results

By the way, can you please write another line to plot the dominant cycle phase too?
sal157011
@sushamab, You can add new lines 56 and 57 to the script, like this:
plot(DCPhase/180-1,"DCPhase",color=blue,style=circles)
plot((DCPhase+45)/180-1,"LeadDCPhase",color=red,style=circles)
ssmb78
@sal157011, thanks a ton

One more quick question... What I have understood from Mr. Ehlers books and papers is that when leadsine crosses over sine it's an up cycle and when leadsine crosses below sine it's a down cycle... but some authors in TV have stated otherwise... So can you please clarify which one is correct?
sal157011
@sushamab, Please see what I wrote on my script Sine Wave by searching on TradingView scripts for "Sine-Wave" . Don't forget the "". You can search also on Google for hilbert sine wave .
jonatan88943
Hello, thanks for the script. How can I convert the script to Pine script 5? I get Undeclared identifier errors.
sal157011
@jonatan88943, You don't need to convert the script from //@version=2 to //@version=5 to use it but if you want to use version 5 change:
//@version=2 to //@version=5
study to indicator
atan to math.atan
insert before line 21 new line Cycle = 0.0
next line change Cycle = to Cycle :=
on line 22 change n to bar_index
percentile_nearest_rank to ta.percentile_nearest_rank
ceil to math.ceil
abs to math.abs
sin to math.sin
cos to math.cos
red to color.red
blue to color.blue
jonatan88943
@sal157011, Thank you!
עוד