TTrades Daily Bias [TFO]

Inspired by @TTrades_edu video on daily bias, this indicator aims to develop a higher timeframe bias and collect data on its success rate. While a handful of concepts were introduced in said video, this indicator focuses on one specific method that utilizes previous highs and lows. The following description will outline how the indicator works using the daily timeframe as an example, but the weekly timeframe is also an included option that functions in the exact same manner.

On the daily timeframe, there are a handful of possible scenarios that we consider: if price closes above its previous day high (PDH), the following day's bias will target PDH; if price trades above its PDH but closes back below it, the following day's bias will target its previous day low (PDL).

Similarly, if price closes below its PDL, the following day's bias will target PDL. If price trades below its PDL but closes back above it, the following day's bias will target PDH.

If price trades as an inside bar that doesn't take either PDH or PDL, it will refer to the previous candle for bias. If the previous day closed above its open, it will target PDH and vice versa. If price trades as an outside bar that takes both PDH and PDL, but closes inside that range, no bias is assigned.

With a rigid framework in place, we can apply it to the charts and observe the results.

As shown above, each new day starts by drawing out the PDH and PDL levels. They start out as blue and turn red once traded through (these are the default colors which can be changed in the indicator's settings). The triangles you see are plotted to indicate the time at which PDH or PDL was traded through. This color scheme is also applied to the table in the top right; once a bias is determined, that cell's color starts out as blue and turns red once the level is traded through.

The table indicates the success rate of price hitting the levels provided by each period's bias, followed by the success rate of price closing through said levels after reaching them, as well as the sample size of data collected for each scenario.

In the above crude oil futures (CL1!) 30m chart, we can glean a lot of information from the table in the top right. First we may note that the "PDH" cell is red, which indicates that the current day's bias was targeting PDH and it has already traded through that level. We might also note that the "PWH" cell is blue, which indicates that the weekly bias is targeting the previous week high (PWH) but price has yet to reach that level.

As an example of how to read the table's data, we can look at the "PDH" row of the crude oil chart above. The sample size here indicates that there were 279 instances where the daily bias was assigned as PDH. From this sample size, 76.7% of instances did go on to trade through PDH, and only 53.7% of those instances actually went on to close through PDH after hitting that level.

Of course, greater sample sizes and therefore greater statistical significance may be derived from higher timeframe charts that may go further back in time. The amount of data you can observe may also depend on your TradingView plan.

If we don't want to see the labels describing why bias is assigned a certain way, we can simply turn off the "Show Bias Reasoning" option. Additionally, if we want to see a visual of what the daily and weekly bias currently is, we can plot that along the top and bottom of the chart, as shown above. Here I have daily bias plotted at the top and weekly bias at the bottom, where the default colors of green and red indicate that the bias logic is expecting price to draw towards the given timeframe's previous high or low, respectively.

For a compact table view that doesn't take up much chart space, simply deselect the "Show Statistics" option. This will only show the color-coded bias column for a quick view of what levels are being anticipated (more user-friendly for mobile and other smaller screens).

Alerts can be configured to indicate the bias for a new period, and/or when price hits its previous highs and lows. Simply enable the alerts you want from the indicator's settings and create a new alert with this indicator as the condition. There will be options to use "Any alert() function call" which will alert whatever is selected from the settings, or you can use more specific alerts for bullish/bearish bias, whether price hit PDH/PDL, etc.

Lastly, while the goal of this indicator was to evaluate the effectiveness of a very specific bias strategy, please understand that past performance does not guarantee future results.

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?