OPEN-SOURCE SCRIPT

Longable/Shortable

Por StefanReich
Actualizado
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.
Notas de prensa
Minimal fix
Notas de prensa
You can now disable the triangles in the Style tab if you only want to see the current bias.
Notas de prensa
  • 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).
Notas de prensa
Hiding triangle for non-confirmed candle (clearer that way)
Notas de prensa
Showing the unconfirmed values in the status line so you can anticipate what the signal for the next candle may be.
Notas de prensa
Minor fix for status line values
Notas de prensa
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

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad