Sine Wave TheoryThere are some ideas out there that the market is like a collection of quantum events and that it could all be broken down into sine waves. I created this script to put that to the test.
The idea is simple, I tested 3 different factors that could be put into sine wave form.
1.) Bar Change
2.) Volume Average Change
3.) Coin Flip
For the bar change, I simply allow the sine wave to move upwards or downwards if the bars have changed color in their sequence. For example, if there were 3 red bars and 1 green bar, it would not move the sine wave up or down until the green bar appeared.
For the average volume change, it was the same idea, except that the sine wave could only move up or down if the volume had moved up or below the average value of the length given for calculating the average volume.
Finally, the coin flip simply simulates flipping a coin, and allows the sine wave to move one direction or the other once it has a side that is different from the previous chosen side. For example, heads, heads, heads, tails (once it flipped to tails, this would allow it to move a direction).
The sine wave trading theory that I watched claimed that if you know the correct sine wave # (which is how large the peak is, and/or the sine wave count which is how many peaks and valleys occur) that you can successfully predict future trades. Their claims that the reason it does not look like a perfect sine wave for these events is because there is different amounts of trading going on, thus the timing will be slightly off.
I am posting this to disagree with their ideas. For example, if you select to turn on trading for coin flip and turn off bar change, you will see the coin flip did better on the default settings!
It just so happens that any setting will eventually be good, making all the sine wave variations just completely random if you win or not.
I posted this to demonstrate how silly trading sine waves is. The real trick is using cosine and tangent waves... lol j/k
I hope this helps someone avoid this scam concept.
Sinewaves
even_better_sinewave_mod
Description:
Even better sinewave was an indicator developed by John F. Ehlers (see Cycle Analytics for Trader, pg. 159), in which improvement to cycle measurements completely relies on strong normalization of the waveform. The indicator aims to create an artificially predictive indicator by transferring the cyclic data swings into a sine wave. In this indicator, the modified is on the weighted moving average as a smoothing function, instead of using the super smoother, aim to be more adaptive, and the default length is set to 55 bars.
Sinewave
smoothing = (7*hp + 6*hp_1 + 5*hp_2+ 4*hp_3 + 3*hp_4 + 2*hp5 + hp_6) /28
normalize = wave/sqrt(power)
Notes:
sinewave indicator crossing over -0.9 is considered to beginning of the cycle while crossing under 0.9 is considered as an end of the cycle
line color turns to green considered as a confirmation of an uptrend, while turns red as a confirmation of a downtrend
confidence of using indicator will be much in confirmation paired with another indicator such dynamic trendline e.g. moving average
as cited within Ehlers book Cycle Analytic for Traders, the indicator will be useful if the satisfied market cycle mode and the period of the dominant cycle must be estimated with reasonable accuracy
Other Example
Ehlers Sinewave Indicator V2 [CC]The Sinewave Indicator was created by John Ehlers (Cybernetic Analysis For Stocks And Futures pgs 154-155) and this is an updated version of his original Sinewave Indicator which in my opinion seems to be more reactive to changes. Buy when the blue line crosses over the red line and sell when the blue line crosses under the red line. Also keep in mind that this indicator is based on cycles so it won't act the same as a typical indicator.
Let me know if there are other scripts you would like to see me publish or if you want something custom done!
Ehlers Sinewave Indicator [CC]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!
Ehlers Even Better Sinewave Indicator [CC]The Even Better Sinewave Indicator was created by John Ehlers (Cycle Analytics For Traders pgs 161-162) and this indicator works well when the stock is in a trend mode. It will let you know how long to stay with a trade and it works best with a trend confirmation but it can also work on it's own fairly well. Buy when the indicator line is green and sell when it is red.
Let me know if there are other scripts you would like me to do or if you want something custom done!