PROTECTED SOURCE SCRIPT

Support and Resistance Pivot Points/Lines [Mauserrifle]

Por mauserrifle
Atualizado
Support and Resistance Pivot Points/Lines by Mauserrifle. A personal take on drawing support and resistance pivot lines. This indicator was born as the core of bot strategies I am trying to build. I think this indicator with its feature called “Cooldown rounding” can be useful to others to manually scalp or analyze charts. I did not find other indicators to do the same so I hope you find it useful.

A summary of the features:

  1. It will draw high/low pivot lines based on a maximum of eight higher timeframes
  2. You can set up how many days the lines are valid and appear per timeframe. The default period days are based on a 2m chart strategy. Consider higher values for day charts.
  3. The lines will be drawn from the moment when they are KNOWN, which helps analyzing historical charts. You can change this behavior to make them draw from the pivot (looking at future data on historic data)
  4. The pivot point lines can be rounded by multiple methods: round, ceil/floor, roundn (decimal) and round_to_mintick. This general rounding feature is disabled by default because, in my opinion, a much more useful one can be used which I call “Cooldown rounding” described in the next point.
  5. Cooldown rounding: Round lows and highs for a cooldown period to keep the previous pivot line instead of adding a new line when they match the rounded value within the cooldown period. The existing line will be extended. This feature is useful because it makes sure the initial line is added to the exact high/low pivot level but any future lines within the rounding will just extend the existing line. Consider using roundn on some intraday charts such as SPY 2m.
  6. You can set a maximum minutes for the cooldown. The default is 3 years which is just based on some charting techniques for scalping 2m. It will just enable the cooldown rounding permanently on the intraday (due max bar limit) and with a limit on daily. Tweak it to your needs.
  7. It is possible to always add new pivot lines when a new high is higher or low is lower compared to previous line. Thus ignoring the rounding logic. Consider disabling it on intraday charts such as SPY 2m.


NOTE:
  • Only configured timeframes EQUAL/ABOVE your chart timeframe will activate
  • The default period days are optimized for a 2m intraday trading strategy. Consider higher values for day charts.
  • Max lines rendered is set to 500
  • Line calculation is limited by the max bars of the chart and date range
  • Repainting may happen on intraday when for example using a 2m chart timeframe with pivots on 15m+ (as documented by tradingview). Rendered days 7+ will also cause repainting issues on 2m charts. See tradingview support docs: 43000478429. For scalping manually using already known lines this shouldn't be a problem I think but be aware!
  • The default settings have been set so every chart timeframe will show lines without further configuration.
  • Keep an eye on the data window how many lines are rendered. Make sure you never exceed 500. Anything above will cause earlier lines to disappear which could be a problem when you use it to analyze historical data.



I hope you find this useful!



DISCLAIMER

Trading is risky & most day traders lose money. This indicator is purely for informational & educational purposes only. Past performance does not guarantee future results.
Notas de Lançamento
  • Added options to configure line style and width
  • Fixed issue where cooldown rounding was not always working
  • Improved render performance
educationalPivot points and levels
mauserrifle

Script protegido

Este script é publicado como de código fechado e você pode usá-lo livremente. Você pode favoritá-lo para utilizá-lo em um gráfico. Você não pode visualizar ou modificar seu código fonte.

Quer usar esse script no gráfico?

Aviso legal