Example - HTF Values Without 'Security()'This is an example of how to reference higher timeframe data without the
need for a 'security()' call.
I have attempted to create the function example:
f_insecurity()
with the purpose of wrapping up and pumping out all common relevent HTF
price data that's needed for your everyday indicators in a reliable fashion.
Resolution
Previous Period Levels - X Alerts====== ABOUT THIS INDICATOR
- A simple but highly customisable display of previous higher time-frame
OHLC values, drawn using line.new and label.new. Nothing fancy but...
- Customised resolution input which excludes time frames lower than 1 hour
while extending the common higher reference inputs to include:
• 6, and 12 Hour
• 5 Day
• 3, and 6 Month
• 1 Year
- Alert conditions using an adjustable SMA to help reduce false positive
spam.
- Full visual customisation options for (almost) every aspect, so it can be
tuned to suit most individual preferences.
- In line with the miriad visual customisation options is the ability to
change the display format of the Labels, to show more or less information,
or disable them altogether.
====== REASON FOR STUDY
- To practice advanced user input option handling to allow for a full visual
customisation experience without stepping outside of, or interfering with,
the intended function of the indicator.
- Provide reasonably clear code commenting and structure in order to be
useful as a potential learning aid for others, and future reference for
myself.
====== DISCLAIMER
Any trade decisions you make are entirely your own responsibility.
I've made an effort to squash all the bugs, but you never know!
Moving Average 4 & 8 daily, on all timeframesThis script takes 2 of the most popular moving averages ( 4 & 8 SMA ) in one indicator and will allow you the set the resolution to any time frame you want. If you are day trading, but want to keep an eye on the daily 4 SMA and 8 SMA on your 5 min chart; this script will do the trick. You can also change the period for both MA's.
CC - Array-meta Consolidated Interval Display (ACID)This script extends my other two Array examples (which I've also provided to you open source):
The Ticker-centric 5m,15m,45m,1h,4h,1d resolution labels using arrays:
And the more Macro VIX,GLD,TLT,QQQ,SPY,IWM 1d resolution labels using arrays:
This script aims to show how to use min/max/avg with Arrays easily. My next example after this will be exploring the usage of variance versus covariance ratios over different periodic interval resolutions. Currently, this is using the following intervals: 5m,15m,45m,1h,4h,1d. It takes these intervals, calculates the values at those resolutions and puts the absolute min and max from the 5 minute to the 1 day resolutions.
It's more of an example of the power that arrays can hold, as all this truly is right now is a min/max bound calculator. The real gem lies in the avg calculators for multiple resoltuions tied into a single label with readable data. Check out the code and let me know what you think. If you need more examples, the other two scripts I mentioned before are also open source.
Using this on intervals of less than 1D sometimes times out, the way I wrote it is memory intensive, may not work for non-pro users.
Thanks!
NONE OF THIS IS FOREWARD LOOKING STATEMENTS, THIS IS NOT A PREDECTIVE ANALYSIS TOOL. THIS IS A RESEARCH ATTEMPT AT A NOVEL INDICATOR. I am not responsible for outcomes using it.
Please use and give criticisms freely. I am experimenting with combining resolutions and comparing covariance values at different levels right now, so let me know your thoughts! The last indicator will likely not be open source, but may be depending on how complex I get.
RSI Call-outs Multi-resolution [BigBitsIO]This is a simple multi-resolution (multi-timeframe) RSI indicator that overlays the current chart to show labels for specified oversold and overbought areas defined with inputs.
Up to 4 different resolutions/timeframes for their respective RSI (1,2,3, or 4). RSI1 is always enabled and can not be disabled.
Red labels with white text represent overbought RSI levels as defined by the user. All enabled RSI will have to qualify as overbought based on settings.
Green labels with black test represent oversold RSI levels as defined by the user. All enabled RSI will have to qualify as oversold based on settings.
This RSI overlay help easily call-out overbought and oversold candles on a chart where other RSI values on larger resolutions/timeframes are also oversold/overbought without sacrificing screen space for a traditional RSI indicator that is not overlayed on the chart.
This indicator has alert conditions that will trigger when all enabled RSI indicators are either oversold or overbought respective to your settings.
Note: The best results are to operate your chart as your smallest RSI resolution selected. Personally, I prefer to have my smallest (shortest timeframe) in RSI1, and go larger farther out to RSI4.
[RD] Easy dynamic resolution dashboard=== Easy dynamic resolution dashboard (initial) ===
Easy dashboard to show different running reolution bars most of the scale is adjustable.
Current state is initial and could have some bugs, or been in a cleaner way of coding. Let me know if you find something so we could fix it
Best way to start is in a seperate pane to adjust the you like best or most. Afterwards can copied to chart if needed
The round circle in the middle is the avg low|high price of that specifick candle in the resolution
Loading and input adjustments could take a while (reload)
You should get a warning if the current timeframe is higher then the input resolutions choosen. Adjust the reolutions according and you should be fine
Special thanks go to and borrowed some code from
- @PineCoders
- @RicardoSantos
Notes / Updates
- Let me know where it need (bug) fixes or adjustments
Scripting Tutorial 8 - Triple Many Moving Averages RibbonsThis 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 information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
Scripting Tutorial 7 - Triple Many Moving Averages ResolutionsThis 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 information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
15minMAThis script lets you plot a simple or exponential moving average from a specific time frame that you can select. For example, if you always want the Daily 50MA on your chart, regardless of what resolution your chart is on, this will do it. It's also color coded to show if it's rising or falling.
Multiple Moving Averages [clean]Very simple indicator script to display multiple simple moving averages. I know others have made this but they often are too feature-rich and can get cluttered.
Can optionally show a cross when MA 1 crosses MA 3. These are colors such that when MA 1 crosses BELOW MA 3 a red cross is shown, and green when crossing above.
Heffae Resolution Commander (RAW)This is a script to call resolutions with some math on top of your base resolution.
Using the modulo operator to quantize integer values, it works by converting the modified resolution integer to a 4 digit string value.
Use the function within your own scripts to call funny resolutions otherwise difficult to calculate.
You cannot add series expressions to the resolution value since pine does not allow "series" as a resolution for a security call
However, you could easily stack a crapload of these together and use an expression to switch the referenced security function for your purposes.
This is the raw timeframe output as integer, not string.
To go back to string outputs (for use in security calls etc) unslash line 52 //resvalue
For those interested in the verbose version of the timeframe mod function, showing all the steps, here is a pastebin:
pastebin.com
Cheers! Drop a line / comment if you enjoy or have any questions on how to integrate this into your script@!
The Modulo operator is so much fun!
Heffae Resolution CommanderThis 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 this script is what is valuable, use it within your own scripts to call funny resolutions otherwise difficult to calculate.
You cannot add series expressions to the resolution value since pine does not allow "series " as a resolution for a security call
However, you could easily stack a crapload of these together and use
an expression to switch the referenced security function for your purposes.
The SMA and plot overlay are just there to show a visual example of how the function works.
You can view the raw timeframe output integer by getting rid of tostring(x) and // out the security calls,
plotting the raw function outputs.
For those interested in the verbose version of the timeframe mod function, showing all the steps, here is a pastebin:
pastebin.com
Cheers! Drop a line / comment if you enjoy or have any questions on how to integrate this into your script@!
The Modulo operator is so much fun!
B3 MTF OHLCB3 M ulti T ime F rame - O pen H igh L ow C lose
For showing a 2nd resolution on one chart; Not much more to say about that :)
Multi Time Frame Compatible Simple Moving AverageDisplays 5, 20, 50, and 200 days moving averages on any chart regardless of the chart's resolution.It makes sure you see the same moving average regardless the resolution of your chart or your timeframe