HTF CandlesThis Indicator overlay candles from a timeframe input. Use it to see Higher Time candles on your current chart Heikin ashi optionnalPine Script®指标由sosso_bott提供已更新 1161
HighTimeframeSamplingLibrary "HighTimeframeSampling" Library for sampling high timeframe (HTF) data. Returns an array of historical values, an arbitrary historical value, or the highest/lowest value in a range, spending a single security() call. An optional pass-through for the chart timeframe is included. Other than that case, the data is fixed and does not alter over the course of the HTF bar. It behaves consistently on historical and elapsed realtime bars. The first version returns floating-point numbers only. I might extend it if there's interest. 🙏 Credits: This library is (yet another) attempt at a solution of the problems in using HTF data that were laid out by Pinecoders - to whom, especially to Luc F, many thanks are due - in "security() revisited" - which I recommend you consult first. Go ahead, I'll wait. All code is my own. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ WHAT'S THE PROBLEM? OR, WHY NOT JUST USE SECURITY() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There are many difficulties with using HTF data, and many potential solutions. It's not really possible to convey it only in words: you need to see it on a chart. Before using this library, please refer to my other HTF library, HighTimeframeTiming: which explains it extensively, compares many different solutions, and demonstrates (what I think are) the advantages of using this very library, namely, that it's stable, accurate, versatile and inexpensive. Then if you agree, come back here and choose your function. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MOAR EXPLANATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 🧹 Housekeeping: To see which plot is which, turn line labels on: Settings > Scales > Indicator Name Label. Vertical lines at the top of the chart show the open of a HTF bar: grey for historical and white for real-time bars. ‼ LIMITATIONS: To avoid strange behaviour, use this library on liquid assets and at chart timeframes high enough to reliably produce updates at least once per bar period. A more conventional and universal limitation is that the library does not offer an unlimited view of historical bars. You need to define upfront how many HTF bars you want to store. Very large numbers might conceivably run into data or performance issues. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ BRING ON THE FUNCTIONS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @function f_HTF_Value(string _HTF, float _source, int _arrayLength, int _HTF_Offset, bool _useLiveDataOnChartTF=false) Returns a floating-point number from a higher timeframe, with a historical operator within an abitrary (but limited) number of bars. @param string _HTF is the string that represents the higher timeframe. It must be in a format that the request.security() function recognises. The input timeframe cannot be lower than the chart timeframe or an error is thrown. @param float _source is the source value that you want to sample, e.g. close, open, etc., or you can use any floating-point number. @param int _arrayLength is the number of HTF bars you want to store and must be greater than zero. You can't go back further in history than this number of bars (minus one, because the current/most recent available bar is also stored). @param int _HTF_Offset is the historical operator for the value you want to return. E.g., if you want the most recent fixed close, _source=close and _HTF_Offset = 0. If you want the one before that, _HTF_Offset=1, etc. The number of HTF bars to look back must be zero or more, and must be one less than the number of bars stored. @param bool _useLiveDataOnChartTF uses live data on the chart timeframe. If the higher timeframe is the same as the chart timeframe, store the live value (i.e., from this very bar). For all truly higher timeframes, store the fixed value (i.e., from the previous bar). The default is to use live data for the chart timeframe, so that this function works intuitively, that is, it does not fix data unless it has to (i.e., because the data is from a higher timeframe). This means that on default settings, on the chart timeframe, it matches the raw source values from security(){0}. You can override this behaviour by passing _useLiveDataOnChartTF as false. Then it will fix all data for all timeframes. @returns a floating-point value that you requested from the higher timeframe. @function f_HTF_Array(string _HTF, float _source, int _arrayLength, bool _useLiveDataOnChartTF=false, int _startIn, int _endIn) Returns an array of historical values from a higher timeframe, starting with the current bar. Optionally, returns a slice of the array. The array is in reverse chronological order, i.e., index 0 contains the most recent value. @param string _HTF is the string that represents the higher timeframe. It must be in a format that the request.security() function recognises. The input timeframe cannot be lower than the chart timeframe or an error is thrown. @param float _source is the source value that you want to sample, e.g. close, open, etc., or you can use any floating-point number. @param int _arrayLength is the number of HTF bars you want to keep in the array. @param bool _useLiveDataOnChartTF uses live data on the chart timeframe. If the higher timeframe is the same as the chart timeframe, store the live value (i.e., from this very bar). For all truly higher timeframes, store the fixed value (i.e., from the previous bar). The default is to use live data for the chart timeframe, so that this function works intuitively, that is, it does not fix data unless it has to (i.e., because the data is from a higher timeframe). This means that on default settings, on the chart timeframe, it matches raw source values from security(). You can override this behaviour by passing _useLiveDataOnChartTF as false. Then it will fix all data for all timeframes. @param int _startIn is the array index to begin taking a slice. Must be at least one less than the length of the array; if out of bounds it is corrected to 0. @param int _endIn is the array index BEFORE WHICH to end the slice. If the ending index of the array slice would take the slice past the end of the array, it is corrected to the end of the array. The ending index of the array slice must be greater than or equal to the starting index. If the end is less than the start, the whole array is returned. If the starting index is the same as the ending index, an empty array is returned. If either the starting or ending index is negative, the entire array is returned (which is the default behaviour; this is effectively a switch to bypass the slicing without taking up an extra parameter). @returns an array of HTF values. @function f_HTF_Highest(string _HTF="", float _source, int _arrayLength, bool _useLiveDataOnChartTF=true, int _rangeIn) Returns the highest value within a range consisting of a given number of bars back from the most recent bar. @param string _HTF is the string that represents the higher timeframe. It must be in a format that the request.security() function recognises. The input timeframe cannot be lower than the chart timeframe or an error is thrown. @param float _source is the source value that you want to sample, e.g. close, open, etc., or you can use any floating-point number. @param int _arrayLength is the number of HTF bars you want to store and must be greater than zero. You can't have a range greater than this number. @param bool _useLiveDataOnChartTF uses live data on the chart timeframe. If the higher timeframe is the same as the chart timeframe, store the live value (i.e., from this very bar). For all truly higher timeframes, store the fixed value (i.e., from the previous bar). The default is to use live data for the chart timeframe, so that this function works intuitively, that is, it does not fix data unless it has to (i.e., because the data is from a higher timeframe). This means that on default settings, on the chart timeframe, it matches raw source values from security(). You can override this behaviour by passing _useLiveDataOnChartTF as false. Then it will fix all data for all timeframes. @param _rangeIn is the number of bars to include in the range of bars from which we want to find the highest value. It is NOT the historical operator of the last bar in the range. The range always starts at the current bar. A value of 1 doesn't make much sense but the function will generously return the only value it can anyway. A value less than 1 doesn't make sense and will return an error. A value that is higher than the number of stored values will be corrected to equal the number of stored values. @returns a floating-point number representing the highest value in the range. @function f_HTF_Lowest(string _HTF="", float _source, int _arrayLength, bool _useLiveDataOnChartTF=true, int _rangeIn) Returns the lowest value within a range consisting of a given number of bars back from the most recent bar. @param string _HTF is the string that represents the higher timeframe. It must be in a format that the request.security() function recognises. The input timeframe cannot be lower than the chart timeframe or an error is thrown. @param float _source is the source value that you want to sample, e.g. close, open, etc., or you can use any floating-point number. @param int _arrayLength is the number of HTF bars you want to store and must be greater than zero. You can't go back further in history than this number of bars (minus one, because the current/most recent available bar is also stored). @param bool _useLiveDataOnChartTF uses live data on the chart timeframe. If the higher timeframe is the same as the chart timeframe, store the live value (i.e., from this very bar). For all truly higher timeframes, store the fixed value (i.e., from the previous bar). The default is to use live data for the chart timeframe, so that this function works intuitively, that is, it does not fix data unless it has to (i.e., because the data is from a higher timeframe). This means that on default settings, on the chart timeframe, it matches raw source values from security(). You can override this behaviour by passing _useLiveDataOnChartTF as false. Then it will fix all data for all timeframes. @param _rangeIn is the number of bars to include in the range of bars from which we want to find the highest value. It is NOT the historical operator of the last bar in the range. The range always starts at the current bar. A value of 1 doesn't make much sense but the function will generously return the only value it can anyway. A value less than 1 doesn't make sense and will return an error. A value that is higher than the number of stored values will be corrected to equal the number of stored values. @returns a floating-point number representing the lowest value in the range.Pine Script®库由SimpleCryptoLife提供已更新 2237
HTF Trending AnalysisThis is a very simple tool I created for historical analysis. Its intent is to simply draw a box from the current date to a month/year that you specify. Maybe you will have some other uses for itPine Script®指标由nsrgroup提供11121
Fair Value Gap / FVG - HTF Orderflow bias / trendCalculates Fair Value Gap (FVG) as a counter and plots it below price. FVG Counter value resets to +ve or -ve once the FVG counter reverses direction. Use this script to find a bias to trade with. Best used on HTF (like 1W, 1D), so the bias can be transferred to LTF (like 4H, 1H). If you end up using this script, please leave a comment below on how you used it. I can try to incorporate those ideas in an update. Cheers!Pine Script®指标由makuchaku提供2929 2.3 K
HTF Candlestick Patterns [TradingView] vX by DGTCandlesticks are graphical representations of price movements for a given period of time. They are commonly formed by the opening, high, low, and closing prices of a financial instrument. They have their origins in the centuries-old Japanese rice trade and have made their way into modern day price charting. It’s important to note that candlestick patterns aren’t necessarily a buy or sell signal by themselves. They are instead a way to look at market structure and a potential indication of an upcoming opportunity. It is always useful to look at candlestick patterns in context like any other market analysis tool and candlestick patterns are most useful when used in combination with other techniques. There are countless candlestick patterns that traders can use to identify areas of interest on a chart, where some candlestick patterns may provide insights into the balance between buyers and sellers, others may indicate a reversal, continuation, or indecision. Reversal patterns are quite useful when used in context. Reversal patterns should form at the bottom of a downtrend or at the top of an uptrend. Otherwise, they are not a reversal patterns, but continuation patterns. Most reversal patterns require confirmation such as price move in the direction of reversal accompanied by appropriate trading volume. The reversal patterns can further be confirmed through other means of traditional technical analysis—like trend lines, momentum, oscillators, or volume indicators—to reaffirm buying or selling pressure. The patterns themselves do not guarantee that the trend will reverse. Investors should always confirm reversal by the subsequent price action before initiating a trade. This study implements some of the most commonly used candlestick patterns in a context with directional movement indicator. On request users can adjust the strong trend threshold from dialog box, eighter can disabled correlation with directional movement indicator. To add additional sight to analysis the simple moving averages of 20, 50, 100 and 200 periods are added (configurable) You may add additional indicators of your choice. Colored DMI, BB Cloud or Price Distance to its MAs may help Enjoy it! Disclaimer: The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd tradingview user liable for any possible claim for damages arising from any decision you make based on use of the script Pine Script®指标由dgtrd提供已更新 1818 2.1 K