Custom FIBOThis script shows 3 Donchian Channel 78.6% and 21.4% intermediary level lines to perform trade analysis. Besides those 6 lines it also optionally shows Fibonacci's retracements with 100%, 127%, 162%, 200% and 262% for one of the Donchian channels.
The 3 Donchian Channels used have default lengths 72, 305 and 1292, calculated after the first length default value of 72. For each of the 3 Donchian Channels only an upper line, set by default at 78.6%, is plotted in green and its complement, set to 21.4%, is plotted in red. When the closing price is above 3 green lines, we say it is Forbidden to Sell ( PV ), and when the closing price is below 3 red lines, we say it is Forbidden to Buy ( PC ). Those conditions are flagged on the chart. These PV-PC conditions were, up to my knowledge, first proposed by Bo Williams.
Fibonacci's retracements are show for the Donchian Channel with length 72 by default, but it can be changed to any length. They are colored as fuchsia (100%), blue (127%), orange (162%), yellow (200%) and navy (262%).
Luyikai
Super EMA PrismThis script implements the Binary Trade Logic (BTL) algorithm to calculate two distinct scores that range from 0 to 7. One score is calculated assigning a power of 2 weight to the positive sign of 3 Phi^3 distant Moving Average (MA) slopes. The other score is calculated assigning a power of 2 weight to the sign of the difference between the price and the value of 3 Phi^3 distant Moving Average (MA).
For the first score, hereafter called as the angle score (AS), the largest MA slope positive sign receives weight 4, the middle length MA slope positive sign receives weight 2 and the shortest MA slope positive sign receives weight 1. The positive sign of an MA is defined as 1 if the slope of the MA is positive and 0, otherwise. Therefore, for MAs 305, 72 and 17, if slope(MA305) > 0, slope(MA72) < 0 and slope(MA17) > 0, then score will be 4*1 + 2*0 + 1*1 = 5. Up to my knowledge, this score was first proposed by Bo Williams and named by him as Prisma.
For the second score, hereafter called as the value score (VS), if the price > largest MA, it receives weight 4. If the price > the middle length MA, it receives weight 2 and if the price > the the shortest MA, it receives weight 1. Therefore, for MAs 305, 72 and 17, if price < MA305, price > MA72 and price > MA17, then score will be 4*0 + 2*1 + 1*1 = 3. Up to my knowledge, this score was first proposed by Bo Williams and named by him as Prisma.
Both AS and VS are calculated for Phi^3 lengths (610, 144, 34) and for Phi^3/2 lengths (305, 72, 17). The scores of the same kind calculated for each set of length are combined multiplying the Phi^3 length score by 10 and adding with with the Phi^3/2 score, therefore providing a 2 digit score ranging from 0 to 77. For instance, if we have AS(610, 144, 34) = 7 and AS(305, 72, 17) = 5, we have AS=75. At the same time, if we have VS(610, 144, 34) = 6 and VS(305, 72, 17) = 4, we have VS=64.
VS score is plotted by default in black, but it can be on white for dark themes. AS is plotted with the color of the longest MA used.
Chart background is colored according to the range of values for AS and VS, checked in the following order:
if AS >= 13 and VS <= 13 then back color = red
if AS >= 13 or VS <= 13 then back color = orange
if AS >= 64 and VS >= 64 then back color = green
if AS >= 64 or VS >= 64 then back color = blue
otherwise back color = none (white o black)
Custom EMA PrismThis script implements the Binary Logic Trading (BLT) algorithm to calculate a score from 0 to 7. This score is calculated assigning a power of 2 weight to the positive sign of 3 Phi^3 distant EMAs' slopes. The largest EMA slope positive sign receives weight 4, the middle length EMA slope positive sign receives weight 2 and the shortest EMA slope positive sign receives weight 1. The positive sign of an EMA is defined as 1 if the slope of the EMA is positive and 0, otherwise. Therefore, for EMAs 305, 72 and 17, if slope(EMA305) > 0, slope(EMA72) < 0 and slope(EMA17) > 0, then score will be 4*1 + 2*0 + 1*1 = 5. Up to my knowledge, this score was first proposed by Bo Williams and named by him as Prisma.
Due too sampling issues, this script ONLY WORKS with graphic time of 1d. I would like to thanks to MrBitmanBob for showing me how to get quotations from a graphic time distinct from the current one.
This script also gets sampling data from graphic times 2h and 30m to calculate their score. As, even for smaller graphic times, price data is sampled at the current time frequency, the EMA lengths for those smaller graphic times needed to be proportionally decreased, meaning that when calculating the score for 1d with lengths 305, 72 and 17, the score for 2h must be calculated with lengths 72, 17 and 4, and the score for 30m must be calculated with lengths 17, 4 an 1. I understand that some precision may be lost but it is the best that is possible.
There is an optional setting for Crypto Currencies that instead of calculating the score for 1d, 2h and 30m, it calculates the score for 1d, 4h and 60m. This is due to the fact that Crypto Currencies are traded 24x7. Despite of this setting, the labels at the Style tab of the settings window remains 2h and 30m, because they must be constants.
This script with the corresponding EMAs chart and the EMAs Angle chart provides a broader view of the trading scenario.
Custom EMA AngleThis script shows the angle of 6 EMAs to perform trade analysis. The EMA angle is also known as its Rate Of Change ( ROC ). The 6 EMAs (I, II, III , IV, V and VI ) default lengthes come from one of the Fibonacci Phi^3 and Phi^3/2 sub series (17, 34, 72, 144, 305 and 610), but can be changed to any values, particularly to the traditionally used 20, 40, 50, 100, 200 and 300. Up to my knowledge, Fibonacci Phi^3 and Phi^3/2 sub series lengthes were first proposed by Bo Williams.
Angle calculation is performed by calculating the tangent over a delta interval. Normalization is required to make the angle independent of the price range.
This script is meant to be used together with the corresponding EMAs on the candle pane. Non normalized view shows a more realistic angle condition but, if intended to be used with the CEMAS indicator, normalized view should be used.
Custom EMA + FIBOThis script combines 6 EMAs with 3 Donchian Channel 78.6% and 21.4% intermediary level lines to perform trade analysis. The 6 EMAs (I, II, III , IV, V and VI ) default lengthes come from one of the Fibonacci Phi^3 and Phi^3/2 sub series (17, 34, 72, 144, 305 and 610), but can be changed to any values, particularly to the traditionally used 20, 40, 50, 100, 200 and 300. Up to my knowledge, Fibonacci Phi^3 and Phi^3/2 sub series lengthes were first proposed by Bo Williams.
The 3 Donchian Channels used have default lengthes 72, 305 and 1292, calculated after the first length default value of 72. For each of the 3 Donchian Channels only an upper line, set by default at 78.6%, is plotted in green and its complement, set to 21.4%, is plotted in red. When the closing price is above 3 green lines, we say it is Forbidden to Sell ( PV ), and when the closing price is below 3 red lines, we say it is Forbidden to Buy ( PC ). Those conditions are flagged on the chart. These PV-PC conditions were, up to my knowledge, first proposed by Bo Williams.
Custom EMA StrategyThis script combines 3 EMAs with Bollinger Bands to build a trend based trading strategy. The 3 EMAs (I, II and III ) default lengthes come from one of the Fibonacci Phi^3/2 sub series (17, 72 and 305), but can be changed to any values, particularly to the traditionally used 20, 50 and 200. Bollinger Band length is set to the same length as EMA I. Up to my knowledge, Fibonacci Phi^3/2 sub series lengthes were first proposed by Bo Williams.
Buy Recommendations happen when src (close) > EMA I > EMA II, EMA I angle > 0 degree, EMA II angle > -1 degree and EMA III angle > -1 degree. My simulations have show that -1 degree usage results in better returns than zero degree.
Top Buy Recommendations happen when, besides Buy recommendation conditions are met, src (close) > HBand, the Bollinger Band High Band.
Sell Recommendations come in 3 flavors: Short Term (close < EMA I), Medium Term (close < EMA2) and Long Term ( EMA I < EMA II).
Angle calculation is performed by calculating the "normalized" tangent over a delta interval. Normalization is required to make the angle independent of the price range.