Chimpanzee V2.5 part A by joylay83Hi everyone, I am an amateur pinecoder. I would like to share my script which is coded with the intention of generating signals to send to 3commas webhook. It is still in development and revision.
This collection of indicators use:
Chart: 15m.
Inverse Fisher Transformation of the RSI to detect dips in the 15m timeframe.
Bollinger band (4H) to filter out false signals.
Triple EMA 21: to mimic price action for easier coding alerts. Currently not involved in generating signals. will be incorporated in the future.
StochRSI: As a visual filter. Currently not involved in generating signals. will be incorporated in the future.
Background will be green if stochRSI is low and red if stockRSI is high.
Candlesticks will be marked with a flag is TEMA breached BB.
One would need to play around with timeframes, BB settings and IFTRSI threshold for different signals.
There are 2 Signal Modes (with regards to IFTRSI):
Threshold: When price action falls below BB and IFTRSI hits buy threshold, a buy/sell signal is generated. Eg if IFTRSI buy threshold is set to -0.9, the buy signal will remain continuously positive as long as IFTRSI is < 0.9.
Cross: When price action falls below BB and IFTRSI hits threshold, nothing happens. It will wait until the IFTRSI cross back over the threshold before firing a signal.
There is another identical set of indicators running on a higher time frame (IFTRSI: 4H, BB: D or 3D, TEMA 21 4H) but on the same chart. This tend to generate less signals but are more reliable. A usage example would be to send a larger buy order if the signal comes from this higher time frame, or execute a sell order after multiple buys from the lower time frame.
It comes in 2 parts:
Part A: Contains overlay display. This displays BB, Triple EMA, buy/sell and StochRSI in labels. the labels are self explanatory.
Part B (please search for it): which is actually the same code but contain non-overlay display. You may also put part B overlay=true but scale to LEFT. The advantage of using overlay=true is that you can move the signal right over the candlesticks (mainly for troubleshooting/debugging). This part contains Inverse Fisher RSI, %B, Signal Line. %B is supposedly idential to Bollinger Bands in Part A.
By default, when there is a buy/sell signal:
lower time frame 15m: Signal Line in Part B will turn blue with a value 1 or -1 which corresponds to a buy or sell label in Part A
higher time frame 4H: Signal Line in Part B will turn red with a value 2 or -2 which corresponds to a HTF buy or sell label in Part A
Part A or B may be used to send signal to the webhook. You have to make sure that the settings of Part A and B are identical.
You may choose to un-display some items to reduce clutter.
Current problems:
1. Still too many buy signals
Although many times it will generate excellent buy signal at many swing lows, but there are many buy signals prior to a major swing low. This can be observed in the picture above. It also generate a couple of buy signals prior to the swing lows. I am currently experimenting with 20m and hourly timeframe to address this issue. More filters are needed eg an oscillator or detecting candlestick patterns.
2. Premature sell signals.
The sell signal is often generated at the beginning of a major bull run. My idea to solve this problem is to move to a higher timeframe and sell only when TEMA crossunder the upper bollinger band.
3. Lack of a backtester that can test multiple concurrent deals.
Buy -> Buy (average down) -> Buy (average down) -> Buy (average down) -> Sell
4. Lack of the ability to calculate average purchase price
Probably have to code it as a strategy
5. Display lag
As the browser is running 2 copies of the idential script, it tends to lag when you drag your chart around. So far there are no timeouts or delay in firing alerts to 3commas.
I do welcome any suggestion for improvement and constructive criticism. tqvm.
Credits : Thank you for doing an awesome job. I learnt a lot from your codes and tutorials.
Credits not listed in any order. If your code is used here and did not receive due credit, kindly drop me a note. tq.
Blessing 3 by JTA Today
@ZenAndTheArtOfTrading (extremely-easy-to-understand tutorials eg fixing repainting)
@LazyBear (various codes)
@Galactus-B Argo I
@TheTradingParrot (Inverse Fisher RSI and Gavin's backtester)
@zendog123 (backtester and various codes)
@ydeniz2000 (Bollinger Bands)
TradingView built-in scripts
Timeframe
Volume-based Support & Resistance ZonesThe new and improved Support & Resistance Zones indicator is here. This indicator is based on high volume at fractal lows or fractal highs with the zones based on the size of the wick for that timeframe’s candle.
This helps traders visualize which price levels are of the most significance for either reversals or continuation of the trend when zones are broken and then re-tested.
Original script is thanks to synapticex and additional modifications is thanks to Lij_MC. Credit to both of them for most of the logic behind this script.
Since then I have made many changes to this script as noted below:
Changed default S/R lines from plots to lines, and gave option to user to change between solid line, dashed line, or dotted line for both S/R lines.
Added additional time frame and gave more TF options for TF1 other than current TF. Now you will have 4 time frames to plot S/R zones from.
Gave user option to easily change line thickness for all S/R lines.
Made it easier to change colors of S/R lines and zones by consolidating the options under settings (rather than under style).
Added extensions to active SR Zones to extend all the way right.
Added option to extend or not extend the previous S/R zones up to next S/R zone.
Added optional time frame labels to active S/R zones, with left and right options as well as option to adjust how far to the right label is set.
Fixed issue where the higher time frame S/R zone was not properly starting from the high/low of fractal. Now any higher time frame S/R will begin exactly at the High/Low points. Note that this may not work perfectly on stocks and if a fractal high/low is too many bars in the past, it will revert to a default max bars back to avoid script errors.
Added to script a function that will prevent S/R zones from lower time frames displaying while on a higher time frame. This helps clean up the chart quite a bit.
Created arrays for each time frame's boxes and lines so that the number of S/R zones can be controlled for each time frame and limit memory consumption.
New alert options added and customized alert messages.
- The way this indicator works is it looks for fractal highs or fractal lows with volume that pierces above the volume's Moving Average. This moving average value can be modified in the settings for each time frame.
- The fractal highs will be confirmed with 3 successive higher highs followed by 2 successive lower highs and vice versa for the fractal lows.
- The zone is created from the fractal high/low and the close of the candle for whatever time frame you selected. The bigger the zone, the more significant that zone is.
- You can disable any zone, change the zones to show lines only, and modify all the colors, transparencies, and thickness of lines for all the zones.
- To create alerts, you first want to enable the types of alerts you want for each time frame in the indicator's settings. Then after you apply changes, right click on one of the zones on the chart, and click "Add Alert on Vol S/R Zones". You do not need to add a title as the correct alert messages are already built-in.
- More changes will be coming in the future!
I hope you find this indicator useful, if so please give it a thumbs up!
If you have any suggestions or features you would like to see, just let me know in the comment section. Thanks and enjoy!
MTF RSI + Average (Multi-Timeframe) [TH]Multi-Timeframe Relative Strength Index --- MTF RSI
Eliminates having to change time intervals to view a different Time Interval's RSI value (up to 5 time intervals possible through the settings).
The RSI values from Multiple Time Frames can be averaged together to show one single RSI.
A table overlay (info box) makes it easy to quickly identify RSI values on the multiple different time frames.
Multi-timeframe Stochastic RSIThe multi-timeframe stochastic RSI utilizes stochastic RSI signals from 11 different time-frames to indicate whether overbought/oversold signals are in agreement or not across time-frames. Ideally traders should enter and exit when conditions are in agreement as indicated by the intensity of the long (green) or short (red) bands at the top and bottom of the indicator. The intensity of the bands indicates how many of the time-frames are currently overbought/oversold.
EMA Levels, Multi-TimeframeThe exponential moving average (EMA) tracks price over time, giving more importance to recent price data than simple moving average (SMA). EMAs for larger timeframes are generally considered to be stronger supports/resistances for price to move through than smaller timeframes. This indicator allows you to specify two different EMA lengths that you want to track. Additionally, this indicator allows you to display not just the EMA levels of your currently viewed timeframe on the chart, but also shows the EMA levels of up to 4 different timeframes on the same chart. This allows you to quickly see if multiple EMA levels are aligning across different timeframes, which is an even stronger indication that price is going to meet support or resistance when it meets those levels on the chart. There are a lot of nice configuration options, like:
Ability to customize the EMA lengths you want to track
Style customization (color, thickness, size)
Hide any timeframes/levels you aren't interested in
Labels on the chart so you can tell which plots are the EMA levels
Optionally display the plot as a horizontal line if all you care about is the EMA level right now
RSI Levels, Multi-TimeframeThe relative strength index (RSI) is a momentum indicator that measures the magnitude of recent price changes to evaluate overbought or oversold conditions. RSI is normally displayed as an oscillator separately from price and can have a reading from 0 to 100. This indicator takes the RSI and plots the 30 & 70 levels onto the price chart so you can see when price is going to meet the 30 or 70 levels. The reason the 30 & 70 levels are important is because many traders (and bots) use those as signals to buy (at 30 RSI) or sell (at 70 RSI). Additionally, this indicator allows you to display not just the RSI levels of your currently viewed timeframe on the chart, but also shows the RSI levels of up to 6 different timeframes on the same chart. This allows you to quickly see if multiple RSI levels are aligning across different timelines, which is an even stronger indication that price is going to change direction when it meets those levels on the chart. There are a lot of nice configuration options, like:
Style customization (color, thickness, size)
Labels on the chart so you can tell which plots are the RSI levels
Optionally display the plot as a horizontal line if all you care about is the RSI level right now
Toggle overbought (RSI 70) or oversold (RSI 30) on/off completely
Shade a particular timeframe x3This is to help you shade 3 different time frames, its showing 3 different timeframes. This will help you determine if you are trading in the right time frame that you want to. It is set to default to Eastern time frame. the default setting are set for 1700-0100, 0100-0600 and 0600-1000. You can change the time frames to which ever you would like to trade. This helps the visual learners to recognize which time frame they are trading in.
RM Timeframe ContinuityThis indicator plots a table off to the right of the chart to help with determining timeframe continuity. Per the Strat, a great edge is only taking trades where full timeframe continuity is in place (i.e. if you are going long, make sure other timeframes are also green).
In this script:
Green candles have green colored boxes, red candles have red colored boxes.
Inside bars are represented by a circle - ⬤
Outside bars are represented by a tall rectangle - ▮
2-up bars are indicated by an up arrow - ▲
2-down bars are indicated by a down arrow - ▼
User defined options:
Pick any timeframe for the 4 boxes
Choose whether to plot the highs/lows of the larger timeframe candles as horizontal rays on your chart (along with the associated colors)
RSI Multi TF strategy
The RSI is a very popular indicator that follows price activity.
It calculates an average of the positive net changes, and an average
of the negative net changes in the most recent bars, and it determines
the ratio between these averages. The result is expressed as a number
between 0 and 100. Commonly it is said that if the RSI has a low value,
for example, 30 or under, the symbol is oversold. And if the RSI has a
high value, 70 for example, the symbol is overbought.
Plots 3 RSI (Weekly, Daily, 4h) at the same time, regardless of the Chart Timeframe.
Highlights in green (or red) if all RSI is oversold (or overbought).
Can trigger custom oversold and overbought alerts when all 3 lines grey(4h), yellow(weekly), and red(daily) go in the oversold or overbought zone. The strongest the curves break the barrier the strongest the alert (vertical red and green bars) shows.
watermarkA little indicator to show what pair your chart is presenting so people can easily see what they are dealing with
you can also put your signature beside it so you can be easily recognizable.
MTF DPO-RSI IndicatorThis indicator uses the principle of taking the RSI of DPO readings across multiple time frames in order to provide trade signals and an overarching view of market conditions to the trader. My hope with creating this indicator was to present more divergence based signals than your typical indicator, while still keeping those signals at a high quality.
In the settings menu, you may specify:
Indicator Timeframe - the chart resolution that is used to calculate values.
Source DPO Length - the number of bars used to calculate the Detrended Price Oscillator value. The DPO value is the source for the RSI calculations.
DPO Hull Smoothing - how much smoothing is applied to the DPO . Smoothing is accomplished by taking a Hull Moving Average of the closing price, and using this to calculate the DPO value.
RSI Length - the number of bars used to calculate the RSI of the DPO value.
Time Multipliers 1 through 6 - use this to define what resolution each plot will represent. A value of 1 will represent the current Indicator Timeframe. A value of 3 will represent 3 times the current Indicator Timeframe, etc.
Show Plot 1 through 6 - toggles the display of plots.
How I trade with this indicator:
A value of under 30 represents an over sold state for that particular plot. A value of over 70 represents an overbought state for that plot.
Identify divergences on a lower timeframe plot which are apparent in overbought or oversold conditions, and confirm the signal with an overbought or oversold condition, or a divergence on a higher timeframe plot. Divergences which begin in oversold or overbought territory and end inside the 30-70 range tend to be more reliable signals, in my experience. Like all indicators, this is best when used in conjunction with other indicators. Trend indicators, such as double EMA's and Supertrend are my favorite pairing, and a stochastic RSI is a good tool to have as well.
This is my first published indicator! If you find unique ways to use it, drop me a message. I'd love to know what you find. :)
Indicator: SMA/EMA (Multi timeframes)This moving average indicator will plot the SMA or EMA sourced from a different timeframe on the current chart.
Applications:
Say you are viewing an hourly chart but you also want to know the ema20 sourced from a higher timeframe (i.e daily) of the same security. The problem with using most built-in indicators is that the MA values are usually calculated from the current chart, so to do that, you will have to toggle between 1h/1D. This script will eliminate this hassle by plotting out the desired alternative timeframe on the same chart.
Dynamic settings
By default the alternative timeframe is 1D, but this can be customized further:
- 1 week chart -> plots out 1 month MA
- 1 day chart -> plots out 1 week MA
- 1 hour chart -> plots out 1 day MA
Volume Zones Multi-Timeframe OverlayAt its core, this indicator is a variation of my other indicator, Welkin Advanced Volume Overlay (for VSA )
This version is based on the power of multi-timeframe analysis. The basic functionality is simple: Plot lines from the high and low of candles formed during periods of high volume and fill the space between them. The volume levels for deciding what counts as "high volume" are based on standard deviations of the volume's SMA , and the higher the volume , the brighter the zone. i.e., a volume zone set by a volume level that is 4 standard deviations higher than average will be more "filled in" and less transparent than a volume zone from a 2 standard deviation candle.
These zones tend to act as areas of congestion, and the "ceilings" and "floors" of the zones as support and resistance . Overlapping zones tend to indicate strength and are likely to require more effort to get through. The more timeframes that agree with each other, the stronger the zone, ceiling, or floor.
By default, these zones are drawn based on the chart's timeframe and 1 timeframe higher, automatically set based on some "standard" values:
1m -> 5m
5m -> 15m
10m -> 30m
15m -> 60m
30m -> 60m
60m -> 1d
1d -> 1w
Finally, both the base timeframe and the higher timeframe are customizable; this is intended to make it easy to "double" up copies of the indicator to fit even more timeframes on the chart, creating a sort of heatmap for volume price analysis.
An example of three copies of the indicator, showing volume zones from 6 different timeframes.
Multi timeframe Stochastic RSI Screener by noop42Here is a custom x4 timeframes Stochastic RSI screener to add on your charts.
Options
Repaint mode : if enabled: values are updated in live, if disabled: values are updated once the concerned candle is closed
Default parameters
Timeframes: 1, 5, 15, 60
Repaint mode: enabled
Notes
Use the lowest timeframe configured on the screener to get real values
A classic x3 multi-timeframe Stochastic RSI indicator is also available
MTF StochRSI indicator by noop42Here is a custom x3 timeframes Stochastic RSI indicator.
Main Features (can be disabled)
Average mode : for each timeframe, a single line corresponding to the average value between K and D is printed
Repaint mode : if enabled: values are updated in live, if disabled: values are updated once the concerned candle is closed
Default parameters
Timeframes: 1, 5, 15
Mode : Average value
Repaint mode: enabled
Hx MTF Sorted MAs Panel with Freeze WarningThis script displays the close price and 4 sorted moving averages of your choice in a small repositionable panel and, when used on a higher timeframe, warns you when values may be different from actual values in the higher timeframe, inciting you to double check the actual values of the moving averages in the higher timeframe the panel is supposed to reflect.
The 4 moving averages and close are sorted together, providing you with a bird’s-eye view of their relative positions, the same way moving averages and last price values are displayed on the right scale.
The black header reminds of:
(1) the timeframe (resolution) used in the panel
(2) the remaining time before a new bar is created in the panel timeframe. Note that this remaining time is different from the one on the right scale, since it is only updated when a new transaction occurs.
Below, price and moving averages are sorted, color coded and followed by:
(1) a trend indicator ↗ or ↘ meaning that last change is up or down
(2) the number of bars since the moving average is above or below close (0 means current bar). This is obviously not displayed after the close price line (white background color).
Use
This panel was basically developed to display higher timeframe data but it can also be used with the same timeframe as chart for example if you do not want to plot moving averages on your chart but are still interested in their trends and relative positions vs price.
If you see something strange (like header is not black and displays NaN), it just means you requested moving averages that are not available in the panel timeframe. This may happen with newly introduced cryptos and “long” MA timeframes.
Different Timeframe
If you choose to use the panel on a different timeframe than the current one, be aware that you should only use timeframes higher than the current one, as per Tradingview recommendations.
If you select a lower timeframe than the current one, the panel timeframe header cell will turn to the alert color you set (fuchsia by default).
After tinkering for a while with the security function, I noticed that sometimes indicator values “freeze” (i.e. stop udating) and I have found no workaround.
What I mean is that when you look at a sma on a 5 minutes timeframe (the reference) and look at this same sma on a 5 minutes timeframe but from a lower timeframe through the security function set with a timeframe of 5 minutes, values returned by the security function are not always up to date and “freeze”. That’s the bad news.
Freeze warning
The better news is that this unexpected behaviour seems to be predictable, at least on minutes timeframes and I implemented an indicator that endeavors to detecting such situations. When the panel believes data may be frozen, the ‘Remaining Time’ header cell will turn to the alert color.
This feature is only implemented on minutes timeframes and can be switched on or off.
Other points of interest in this script
If you code, this function may also interest you:
sortWithIndexes (arrayToSort) returns a tuple (sortedArray, sortedIndexes) and therefore allows multi-dimensional arrays sorting without actually implementing a sorting algorithm 😉.
Default Settings
The default settings provide an example of commonly used moving averages with associated colors ranked from Hot (more nervous) to Cold (less nervous).
These settings are just an example and are NOT meant to be used as a trading system! DYOR!
Hope it will be useful.
Does the Freeze warning work for you? What do you think of my pseudo sorting algorithm?
Enjoy and please let me know what you think in the comments.
MTF Candlestick Patterns Screening [tanayroy]This script displays all candle patterns found in multi-time frames for a given lookback period. Candle pattern screening logic is taken from TradingView’s built-in script. The script works with 5m, 15m, 30m, 1HR, 2HR, 4HR, D, W, M timeframe. Works best with 5m chart.
Options available for trend detection, lookback period, and selecting candle pattern.
Please like, comment, and follow.
Multi-timeframe MAs + Stoch RSI SignalsHello traders,
I welcome you to my first published script on TradingView: “Multi-timeframe Moving Averages + Stochastic RSI”.
The script is based on a simple formula: Buy signals are generated when a fast moving average is above a slower moving average (uptrend) and the Stochastic RSI K line is crossing above the oversold level (entry).
Sell signals are generated when a fast moving average is below a slower moving average (downtrend) and the Stochastic RSI K line is crossing below the overbought level (entry).
This indicator works best in strong trends!
**Please note the above example has repainting turned on which may produce unrealistic results when viewing historical data. See below for more information regarding this and how you can turn it off.**
The user has the following inputs:
- Option to change the Stochastic RSI settings, including the oversold and overbought levels.
- Option to enter any value for both the Fast Moving Average and the Slow Moving Average.
- Option to change between EMA or SMA for each moving average.
- Multiple time frames to choose from, as well as the ability to selectively turn off individual time frames (both plots and alerts).
(Default time frames are 1 hour, 4 hour, and Daily. You can have a 4th time frame by changing your current time frame to something lower than the other 3 time frames)
- Turn on/off repainting: If repainting is turned on you will get an alert and buy/sell signal on chart immediately when condition is met, however the signal may disappear from chart if the condition reverses during the same candle.
If repainting is turned off, the indicator will wait for the candle to close before issuing the alert and painting the signal on chart.
For higher time frames, the indicator will wait for the candle in the higher time frame to close before issuing a signal if repaint is turned off. Default is set to Repaint on, so please be aware of this if you do not want repainting.
How to use alerts:
- Before you do anything, make sure your current time frame is the lowest time frame you’d like alerts on, as you will still receive alerts for the higher time frames you selected in settings.
- Once you have all the settings changed to how you like, save your chart first. Then right click on any of the indicator’s buy/sell signals on the chart and click “Add Alert on MAs + Stoch RSI”.
- Make sure “Any alert() function call” is selected under the Condition.
- You can delete or change the text in “Alert name” if you want as the alert message is already built into the indicator, and it will tell you in the alert message which asset and time frame to buy or sell.
Other things to note:
- The indicator will not display the buy/sell signals of lower time frames when you are on a higher time frame. This was done purposely to reduce clutter on the chart when you switch to higher time frames.
- While the alert message will tell you which time frame a signal was generated, the plots on the chart will instead show “Buy/Sell TF1, or TF2, or TF3”.
If the signal is from the current time frame that the alert was created on, then it will simply show “Buy” or “Sell”.
Hope you guys enjoy using this one, please drop a like if you found it useful. If anyone wants to modify my script in any way, please just credit me for the original work when you publish the script. Good luck!
Multi-Currency & Multi-Timeframe SMA Summary Table
This script displays a summary table of the direction of simple moving averages of all the currencies on all timeframes. The concept was that I wanted a summary page giving me a birds eye view of what is happening in the market. I plan to use it as a common sense check to confirm that I'm not trading against the flow. I'm not planning to use it to blindly enter (ah if only trading was that easy!!!).
The above example is showing the direction of the 100 SMA for 30S, 3min, 15min, 1h, 4h, D for all the currencies. The base currency is adjusted so that the colour coding is adjusted to express the strength of the specific currency. For example in the case of CAD it is showing the directions of SMAs for CADNZD, CADAUD, CADJPY, CADCHF, CADEUR, CADGBP, CADUSD - the base currency is flipped on some pairs so CAD is always the base currency.
An example of what it is showing - look at the 1h column on JPY. All rows are red except for the chf row. This means that the 100SMA is pointing down on all JPY crosses except for JPYCHF (remember, SMA is down assuming JPY is the base currency).
Unfortunately, I could not fit all the script into a single indicator so you have to load an instance of the indicator into the chart for each timeframe you want to see. So the above example has 6 instances of the indicator overlaid - 1 instance for: 30S, 3min, 15min, 1h, 4h and D. Just choose the timeframe and the script will automatically organise the table.
At the bottom (in blue) is a summary score: a score of 7 = the MA is up on that timeframe on all currency crosses; a score of -7 = the MA is down on that timeframe on all currency crosses. So if you look at the example above, the blue row is showing that USD is very strong against all other currencies and the AUD is generally weak against all other currencies (notice the light blue vs the dark blue).
-You can choose the length of the SMA.
-You can chose the 'lookback' period (the bars back the script looks to compare whether the MA is getting higher or lower)
-You can change the colours
-You can adjust the table size to fit your monitor size
I hope its useful - I tried it yesterday and it kept me focused on USD strength (and not get seduced by temporary USD weakness). So it is doing what I designed it to.
Hope its useful. Good luck!
John
Bjorgum MTF MAScope:
Up to 3 MA's can be applied at the users discretion
Choose between 10 different average types including favorites from the Bjorgum series from HEMA to Reversal T3's
Each MA can be independently set
Go Multi-timeframe! Any MA can be set to any timeframe of reference you choose (ex. using 3 different timeframes of higher resolution to your chart reference to establish a multi-time frame trend)
RSI HEATMAP. Use the bar color or the MA color selection toggle to set your color to reference RSI on a gradient. This helps to establish clear visual reference to momentum on top of trend analysis
Assigning RSI bar color to an MA of a higher time frame can allow you to see visual reference of momentum of the greater trend that may be at play.
Example: trying to get short on a 15min while your 1hr and 4hr RSI Heatmap burns deep in oversold.
RSI color can be assigned to the bar color, the MA (1,2 or 3), or both. Alternatively, bar color can be assigned to a more simple rising/ falling MA color and price above/ below the MA for bar color.
ALL MTF FUNCTIONS ARE NON_REPAINTING.
The Idea
The original inspiration behind the script came from an observation of a constant struggle of Pinecoders of both youth or experience to find accurate multi-timeframe indicators that do not repaint, and appear as should on historical bars, while performing reliably in real time. I encourage you to scroll the Pinecoders FAQ on a recent piece explaining the difficulties and caveats of different approaches, but I would like to reference the elimination of the historical bar offset for THIS purpose. MA's are based on closing prices, that is to say they are confirmed and will not change once the bar has closed. There is no need to offset these for historical reference. The purpose of the historical offset is best exemplified, for example, with an intraday strategy involving daily breakouts. Let's entertain going long on a break to a new daily high. We would not know that in real time so we need to reference the previous bars close for BACKTESTING purposes, otherwise we get "lookahead bias". There is no shortage of strategies unintentionally employing this bias out there (I'm sure you have come across them with their unrealistic results).
There is no worry of repainting with the MTF security function included within this script, nor will it offset for something involving lookahead bias. I encourage those that are playing with the code or perhaps writing strategies of their own to borrow the functions within. There is also a function that will return the 10 MA variable selection - yours to keep.
With all that in mind, I wanted a practical script that is easily deployable in everyday trading for the average trader that gives the user a firm grip on their trading steering wheel equipped with the feel of the road. Incorporating several MA's of differing times with the RSI heatmap gives a good visual reference and feel to your trading environment, while offering a level of customization that will fit an individuals personal trading style. The RSI heatmap gradient is per percentage between 30 and 70 and your 2 colors - anything outside of those levels gives you the vibrant bias color
Below I walk through 2 examples of live trades scenarios I made using the mindset the script offers.
The Trade
LONG IZEA
Timeframe: 4hr chart
- 3 Tilson MA's of varying length are deployed at varying intraday time frames
- A bullish pattern in an uptrend offers a possible trade allowing entry from a low risk point from the pattern low
- See the chart for notes and observations using the script
- Notice how the heatmap brightens up as price extends far away from the averages - your risk has elevated for a new position
- Notice the heatmap cool off while price action consolidates sideways
The Trade
SHORT BTCUSDT
Timeframe: 4hr chart
- 3 EMAs are employed - same length (50), with 3 successive timeframe resolutions
- A downtrend is formed with a sharp move to stack the EMAs into layers
- A pull back opportunity presents itself in bearish consolidation
- Notice a Doji star at resistance establishing a swing high as RSI cools off into the EMA dynamic resistance for entry
- An '"equal legs" measured move can be used for a trade target with a stop out above the swing high.
- Again, take note of distance from EMA's, the heatmap in combination with trend development surrounding the MA's
These were just two ideas to show you an example of how to implement some strategy into your trading and to get some interesting use from the indicator. Hope you enjoyed the read and happy trading.
CM MACD Custom Indicator - Multiple Time Frame - V2***For a Detailed Video Overview Showing all of the Settings...
Click HERE to View Video
New _CM_MacD_Ult_MTF _V2 Update 07-28-2021
Thanks to @SKTennis for help in Updating code to V2
Added Groups to Settings Pane.
Added Color Plots to Settings Pane
Switched MTF Logic to turn ON/OFF automatically w/ TradingView's Built in Feature
Updated Color Transparency plots to work in future update
Added Ability to Turn ON/OFF Show MacD & Signal Line
Added Ability to Turn ON/OFF Show Histogram
Added Ability to Change MACD Line Colors Based on Trend
Added Ability to Highlight Price Bars Based on Trend
Added Alerts to Settings Pane.
Customized how Alerts work. Must keep Checked in Settings Pane, and When you go to Alerts Panel, Change Symbol to Indicator (CM_Ult_MacD_MTF_V2)
Customized Alerts to Show Symbol, TimeFrame, Closing Price, MACD Crosses Up & MACD Crosses Down Signals in Alert
Alerts are Pre-Set to only Alert on Bar Close
See Video for Detailed Overview
New Updates Coming Soon!!!
***Please Post Feedback and Any Feature Requests in the Comments Section Below***
Timeweighted Colored VWAP with SlopeHey, traders!
This script calculates the VWAP's change rate against ATR in a number of k-lines. It controls the VWAP line's color based on the average change rate, and it changes its color in a time-weighted way.
1. Calculating vwapValue's rate of change
2. Controlling Line's color based on the average change rate against ATR
3. Calculating average change rate in the past k-lines
K线的数量:计算多少根K线的VWAP值的变化率的平均值,相当于用K线的数量来时间加权
变化率阈值:线条颜色变化的阈值,VWAP值的变化率比这个大或者小时改变颜色,否则延续原来的颜色
Good luck with your trading!
Moving Average Ribbon [TheBearFighter]
This code was written using:
•Pine Script Coding Conventions.
This script provides a very useful tool for new community users and professionals. It puts at your disposal a Moving Average Ribbon by hand to graph and easily find the ones with the highest performance. The creation of this script was motivated because in free TradingView accounts there is a limit of 3 indicators by chart, and with this tool you can draw up to 32 MA's at the same time!
Choose one of 10 types of MA´s:
•KAMA Kaufman's moving average.
•HULL Hull moving average.
•TEMA Triple exponencial moving average.
•LSMA Least square moving average.
•DEMA Double exponencial moving average.
•ALMA Arnaud Legoux moving average.
•WMA Weighted moving average
•EMA Exponencial moving average.
•VWMA Volume Weighted moving average.
•SMA Simple moving average.
Use the tooltips to know the lengths of MA´s.
A main characteristic of the script is that the lengths are in days but when changing the lowest timeframes, the same daily resolution is maintained. This gives us extreme precision in intraday timeframes, e.g 30 minutes.
Once this is understood, we can turning the MA´s on/off, and changing the timeframe to our liking.
Available timeframes: M, W, D, 4H, 1H, 30m, 15m, 5m.
Also the MA´s are colored for easy visualization and know if they grow or decrease.
Thank´s to @midtownsk8rguy to let me know more about HEX colors.
Thank´s to @HPotter for his KAMA.