NOTE: Experimental. Pinescript implementation of Decimal to Binary and Binary to Decimal that is intended for use in the development of a neural network proof of concept. Intended for use in as subcomponent in the development of a more complex/highly experimental prototype. Protection/logic for edge cases above 11111111/255 (8bits) is NOT implemented. ...
This function is similar to the stochastic rsi function. The only difference is that Money Flow Index is used instead of rsi. Oversold and overbought values were changed to 80 and 20. Because the MFI's overbought and overbought zones are 20 and 80. In MFI, I think that it can be more beneficial in liquid markets than stochastic rsi since volume is taken into...
This script plots both real and HA candles regardless or which are used on the chart in TV settings. (and has the functions for you to use.) Lots of people seem to misunderstand backtesting (or scam people) based on HA candles. Backtesting with HA candles leads to impossible trades. ALWAYS backtest with real candles. That doesn't mean you might not want to look...
A simple function to calculate compound interest for given values.
This script is for a triple moving average indicator where the user can select from different types of moving averages, price sources, lookback periods and resolutions. Features: - 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually - Crossovers are plotted on the chart with detailed...
Function - Number of digits before and after the decimal point Detect the number of digits in integers and floats, before the decimal and after it. It also works for negative numbers. There are some rounding issues, but the currently maximum supported number can have safely up to 3 digits after the decimal point.
Symbol Name Prefix Function() Function to detect the Symbol name prefix on the current chart. The prefix is returned as string.
A improvement to previous script: This uses a algorithmic approach for calculating the digits in a integer.
This is a code to showcase a function call bug in PineScript. Problem description: When a function is called from inside of if-then scope, this function may return an invalid result. Code description: Two identical code pieces are used to perform simple calculation. The only difference is that one piece has a part of its code wrapped into a...
20 step red/green gradient function The color gradient function allow colorize any source in 5% steps. Define the source, minimum and maximum value (constant or , for example, bb (or any other channel)).
Here is the Stochastic Oscillator function. Now you can easily use length with mutable variables !!
The relative strength index function is defined. Now you can easily use length with mutable variables !!
Oftentimes a single look at the candlestick configuration happens to be enough to understand what is going on. The chandlestick function is an experiment in smart labelling that produces candles for various time frames, not only for the fixed 1m, 3m , 5m, 15m, etc. ones, and helps in decision-making when eye-balling the chart. This function generates up to 12 last...
Stochastic Relative Strength Index developed by Tushar Chande and Stanley Kroll. This script has been written to eliminate the period variable.(Integer) Thus, it can be used comfortably in adaptive period scripts ! (For example : Adaptive Moving Average , KAMA , FAMA .. etc. ) All efforts goes to ChaosTrader () , RicardoSantos () , Hpotter for barcolor...
Function that returns the number of days in any month.
Function for standardization or zScore.
functions using the new line functions in V4 to draw multiple geometric shapes.