User Selectable Moving Average GuppyA version of the popular "Moving Average Ribbon" or "Guppy" indicators, except nearly everything about it is user selectable. The user can change the source, period, and type of moving average used for every single line on the chart. Note: The visuals are fairly intensive and may take a moment to catch up after adjusting settings.
Credit: This script utilizes the "Color Gradient Framework" tutorial by LucF (PineCoders) to create gradient visuals, which are also customizable for the user.
Moving Average Options:
Running (SMoothed) Moving Average (RMA or SMMA) - Slowest
Simple Moving Average (SMA) - Slow
Exponential Moving Average (EMA) - Responds faster to price than SMA
Weighted Moving Average (WMA)
Volume-Weighted Moving Average (VWMA)
Triple EMA (TEMA)
Exponential Hull Moving Average (EHMA) - Hull with Smoothing (Slower than Hull)
Least Squares Moving Average (LSMA) - Simple Linear Regression
Arnaud Legoux Moving Average (ALMA) - Adjustable, set offset=1 to be current, offset=0.85 for good smoothing (Slower)
Hull Moving Average (HMA) - Normally responds fastest to price of all options
Value Added :
This script is unique in that it allows the user to chart the "Guppy", except nearly everything about it is customizable. The user can change the source, period, and type of moving average used for every single line.
Typically, the Guppy is plotted with simple moving average or exponential moving average, which respond much slower to price than the Hull Moving Average, which this indicator uses as default. (Elimination of lag)
The Hull MA settings for the highest time frame moving averages should work well for assessing the overall macro trend, with a nice visual presentation. Additional labels and alerts for the macro trend are available.
Furthermore, this script provides many more options for type of moving average than is typical for a moving average indicator that provides the user with options, including advanced options such as Hull, TEMA, and ALMA.
The visual presentation is customizable and should provide some entertainment for users who want to create pretty charts.
Selection
Pinescript Selection Sort Using ArraysThe selection sort algorithm sorts an array by repeatedly finding the smallest element from unsorted array and pushing it to the beginning. Two subarrays are maintained during the execution of the script. One of the subarrays is in a sorted state while the other is in a sorted state. After each iteration of the for loop the sorted list is searched for the next correct element which is then pushed onto the sorted subarray.
Worst case performance : О(n^2) comparisons and O(n)swaps
Best case performance : O(n^2) comparisons and O(n) Swaps
Average performance: О(n^2) comparisons and O(n) Swaps
Worst-case space complexity:О(n) total, O(1) auxiliary
The Pseudocode is given below
procedure selection sort
list : array of items
n : size of list
for i = 1 to n - 1
/* set current element as minimum*/
min = i
/* check the element to be minimum */
for j = i+1 to n
if list < list then
min = j;
end if
end for
/* swap the minimum element with the current element*/
if indexMin != i then
swap list and list
end if
end for
end procedure
Combo Strategy 123 Reversal & Commodity Selection Index This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
The Commodity Selection Index ("CSI") is a momentum indicator. It was
developed by Welles Wilder and is presented in his book New Concepts in
Technical Trading Systems. The name of the index reflects its primary purpose.
That is, to help select commodities suitable for short-term trading.
A high CSI rating indicates that the commodity has strong trending and volatility
characteristics. The trending characteristics are brought out by the Directional
Movement factor in the calculation--the volatility characteristic by the Average
True Range factor.
Wilder's approach is to trade commodities with high CSI values (relative to other
commodities). Because these commodities are highly volatile, they have the potential
to make the "most money in the shortest period of time." High CSI values imply
trending characteristics which make it easier to trade the security.
The Commodity Selection Index is designed for short-term traders who can handle
the risks associated with highly volatile markets.
WARNING:
- For purpose educate only
- This script to change bars colors.
What is ProfitableBTC, BNB or your favorite Alt Coin? This indicator shows what is profitable at the moment. Red bars are alt days, green bars are BTC days. Otherwise, it is a BNB day.
Hmm, most of the time it is a BNB day!
Commodity Selection Index Strategy The Commodity Selection Index ("CSI") is a momentum indicator. It was
developed by Welles Wilder and is presented in his book New Concepts in
Technical Trading Systems. The name of the index reflects its primary purpose.
That is, to help select commodities suitable for short-term trading.
A high CSI rating indicates that the commodity has strong trending and volatility
characteristics. The trending characteristics are brought out by the Directional
Movement factor in the calculation--the volatility characteristic by the Average
True Range factor.
Wilder's approach is to trade commodities with high CSI values (relative to other
commodities). Because these commodities are highly volatile, they have the potential
to make the "most money in the shortest period of time." High CSI values imply
trending characteristics which make it easier to trade the security.
The Commodity Selection Index is designed for short-term traders who can handle
the risks associated with highly volatile markets.
[RS]Function - RGB Color (low resolution)Function to handle rgb color selection, it has low resolution due to pinescript limitations.
included examples with manual background color selection via inputs and automatic color of a rsi plot based on its value.
let your rainbow dreams come true!! :D