OPEN-SOURCE SCRIPT

Longable/Shortable

Theo StefanReich
Cập nhật
This indicator advises intraday traders which direction NOT to take trades in, based on recent action in the daily chart. Works on any timeframe.

This is not a buy/sell indicator - it is a FILTER that is meant to SUPPRESS trades you may have wanted to take. Like a Daily Bias, but with a neutral position (no bias).

The indicator shows when NOT to take longs and when NOT to take shorts.

So you need an existing strategy to combine this with.

By default, the last 3 days are taken into account (smoothing=3). Change the threshold to get fewer or more warning signals.

The symbols are very simple:
  • Green triangle = Longs only
  • Red triangle = Shorts only

(Each signal is valid for the next candle. After that it expires.)

The current bias is also shown in the bottom right corner.

How it works: We look at which parts of the last candle overlap with the current one. When the new candle's low is far above the last candle's low, it is an indication not to go short. Similarly, when the new candle's high is far below the last candle's high, it is an indication not to go long.

For each direction, we calculate this as a percentage value (what percentage of the last candle is not overlapping the new one), smooth the value and give a signal when we are above the set threshold.
Phát hành các Ghi chú
Minimal fix
Phát hành các Ghi chú
You can now disable the triangles in the Style tab if you only want to see the current bias.
Phát hành các Ghi chú
  • Fixed the realtime label to reflect the last confirmed candle (not the current candle).
  • Improved the value display in status line/data window to show the exact "longability" and "shortabilty" scores (positive = direction is tradeable, negative = direction is not tradeable).
Phát hành các Ghi chú
Hiding triangle for non-confirmed candle (clearer that way)
Phát hành các Ghi chú
Showing the unconfirmed values in the status line so you can anticipate what the signal for the next candle may be.
Phát hành các Ghi chú
Minor fix for status line values
Phát hành các Ghi chú
Reversed the meaning of the threshold value. Thus, the default value has also changed (from 65 to 35).

This has 2 advantages:
  • The maximum value of the "longable" and "shortable" scores displayed next to the indicator is now identical to the threshold value.
  • The parameter is now much easier to explain: Threshold 35 means that 35% of the top and bottom of each candle must be revisited by the next candle - otherwise a warning signal is generated.
sentiment
StefanReich

Mã nguồn mở

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

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

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