This is a developer friendly solution to the current PineScript limitation of not being able to easily configure presets for multiple timeframes.
If you're developing multi-timeframe strategies then you've no doubt done battle with built-in `input` function which only allows for a single default value. You've probably come up with all kinds of fancy workarounds,...
The PineCoders Backtesting and Trading Engine is a sophisticated framework with hybrid code that can run as a study to generate alerts for automated or discretionary trading while simultaneously providing backtest results. It can also easily be converted to a TradingView strategy in order to run TV backtesting. The Engine comes with many built-in strats for...
Fresh off the press, we have a new breed of indicators: Bitcoin's Hash Rate & Price.
As many of you have read, roughly 80% of BTC's price movements can be correlated to its changes in hash rate volume. I decided to make a stochastic indicator that utilizes this principle to track divergence of the price from the hash rate.
Let's break this down...
In red is the...
I noticed there weren't any code templates for Williams Fractals, therefore I have written this script to be a template and tutorial for those learning Pine Script. Each line is commented to show what it does.
If you don't know what Williams Fractals are, here is a brief explanation.
Bill Williams Fractals is a lagging indicator used to plot trend reversals on a...
Much confusion exists in the TradingView community about backtesting on non-standard charts. This script tries to shed some light on the subject in the hope that traders make better use of those chart types.
Non-standard charts are:
Heikin Ashi (HA)
Point & Figure
These chart types are called non-standard because they all transform market prices...
This is a companion script to the PineCoders Backtesting-Trading Engine. It illustrates how to build a signal plot in another script, which can in turn be fed in the Engine to provide entry, exit, filter and stop information.
Connection to the Engine is done through its “External Indicator” input field at the very bottom of the Engine’s Settings/Inputs.
Even when your code does not use security() calls, repainting dynamics still come into play in the realtime bar. Script coders and users must understand them and, if they choose to avoid repainting, need to know how to do so. This script demonstrates three methods to avoid repainting when NOT using the security() function.
Note that repainting dynamics when not...
This is a 16-color version of our previously published Color Gradient Framework - PineCoders FAQ, which provided the same functionality, but with 10 gradient levels. The additional shades provide better transitions and do not impact speed much.
— Allows the selection of one of 3 color schemes, each containing a pair of bull/bear colors.
Our MTF Selection Framework allows Pine coders to add multi-timeframe capabilities to their script with the following features:
► Timeframe selection
The higher timeframe can be selected using 3 different ways:
• By steps (60 min., 1D, 3D, 1W, 1M, 1Y).
• As a multiple of the current chart's resolution, which can be fractional, so 3.5 will work.
Visual RSI offers a different way of looking at RSI by providing a composite representation of 9 different RSI-generated components. Instead of focusing on one line only, this approach blends multiple sources to provide the viewer with a larger context RSI-based picture.
For those who don’t want to read
• Green in bullish (>50) zone is the most bullish.
• Red in...
Provides a suite of functions to:
— Allow the selection of one of 3 color schemes, each containing a pair of bull/bear colors.
— Generate 10-level gradients for each color.
— Use two types of gradient calculations: one for unbounded and one for bounded signals. We call the 2 modes: Advance/Decline and Relative.
These gradients are designed to work with 2...
This script provides a framework to add alerts to a script.
It uses a method and provides code that:
— Allows the indicator's users to select the plotting of markers representing the different conditions used to trigger alerts.
— Allows filtering of the markers on direction: both, longs only, shorts only.
— Uses a single alert for the indicator. It will trigger...
The need to calculate averages (arithmetic mean) comes up here and there in scripts. When you want the average of a value only when a given condition has occurred, you will often not be able to use the standard sma function in Pine because it will average all values in the series. Even if you take care to use your condition to set non-conforming values to zero,...
This script calculates the run time of a Pine script. While its numbers are not very precise and it doesn’t work on all scripts, it will help developers calculate run times more precisely than by hand, and so provides Pine coders with an additional profiling tool to help them optimize their code.
How to use the code
• Place the code included between the up/down...
This is a script to call resolutions with some math on top of your base resolution.
THIS IS NOT AN INDICATOR TO USE ON A CHART!!! The resolution call function is really useful for your own scripting ideas!
Using the modulo operator to quantize integer values, it works by converting the modified resolution integer to a 4 digit string value.
The function within...
I had been trying to code a predictive algorithm working with sine waves, but I got distracted and made some snow and Christmas trees lol. I'm uploading this with the source code because I'm sure someone will be able to learn from it to create something useful.
Please follow me for some actual useful pine scripts and merry Christmas! :)