INVITE-ONLY SCRIPT

[Trendycator] Trendycator Strategy

Atualizado
This script proposes a simple and intuitive trend following strategy, better usage on those assets which are sufficiently liquid and don't go through random spikes.

This strategy is based on Trendycator Indicator.

Since it is a trend-following system, it works well during trends only and his intent is to find a primary trend and ride it for as long as possible.
We know that the biggest problem is how to understand if asset is in trend or not: for this purpose, the intuitive colors explained hereafter help Traders to understand when asset is in non trend.
It will never enter on the minimum and will never exit on the maximum but will always try to identify the central part of the trend, maintaining the position until the forces supporting the rise of the stock fail.

Usage details

Color interpretation
  • Green color mean that asset is in a UP Trend.
  • Red color mean that asset is in a Down Trend.
  • Gray color mean that indicator is not able to find any clear trend.


Trendycator use stochastic oscillator, which establish the trend and his strength.
As additional filter as noise removal the stochastic oscillator is smoothened using simple moving average.
Trendycator use as well price swing recognition which identify significant high and significant low breakouts.
When stochastic find trend with strength and significant breakout change color: green for up trend and red for down trend.
This mix of trend-following indicator and breakout system is made to avoid, as much as possible, false signal generated from side movement.


Add Strategy to a chart

This strategy works on any instrument but, you have to pay attention to some simple things when you apply the script: you have to properly set the size of trade.
captura

Considering that the strategy include target and stop you must set at minimum 2 contracts (that is default) to make it works properly.
-If you use this strategy on Index, Futures, Forex you need to use “contracts”.
-If you use this strategy on Stock, you need to use “Eur”, or your local currency; in this way, Tradingview will do for you the calculation and buy the exact number of stock for the money you input. For example you can set 10.000 eur of order.

Strategy order explanation
Note: this strategy is designed to work only long.
-Entry order
The entry order is placed on Buy_Stop on High of the first bar when the Trendycator become green.
This High is a trigger level.
-Exit order
During trade strategy will try to sell 50% of the position in target (green line), and other 50% using dynamic trail stop (purple line).
*Trail stop is a percentage of instrument volatility calculated with ATR
Is included a fix percentage safety stop (red line): by default set to -10% from entry.

See below example
captura

Displayed chart
In the lower right corner is displayed a chart that summarize for traders the important strategy information: Target price, Stop, Trailing Stop, last asset close, Percentage of gain of last operation.
Percentage of gain is calculated by this part of code: PercGain := (close / lastEntryPrice - 1) * 100

Strategy Settings

-Activate-Deactivate Target/Stop: with this input you can activate, or deactivate, the target and the static protection stop at -10%.
The strategy can work as well without it, simply entry on green and exit on red signal with add of trail stop.
Normally we prefer use the target as well, for this reason by default is activated.

-Target: you can set the target as percentage from entry level, eg. 10 mean 10% (this work only if activated).
-Protection Stop Fix: you can set the main stop as percentage from entry level, eg. 10 mean 10% (this work only if activated).
-Dynamic Volatility Stop: you can set the Trailing Stop as percentage of volatility calculated with ATR (this cannot be deactivated).
-Trendycator (core of this system) usually doesn’t need to set anything.
This because we believe that the user have to searching for the charts where it works well and never "overfitting" the system on a chart.
Overfitting never work as a long time and in the first step for loosing money.
In Tradingview we decide to let the possibilities to set two specific parameters: "Period_UP" and "Period_DN".
The reason is because this can be adjusted slightly for testing in intraday, but we recommend to manipulate as less as possible.
Period UP/DN meaning: Period_UP are the number of bars considered for swing high detection and Period_DN is the number of bar that Trendycator use for swing low detection.

captura

Important usage note
  • Trendycator was born and tested in weekly timeframe and works in daily as well. Intraday charts, normally have high volatility that is the opposite of trend; weekly, or daily bars reduce the noise.
  • Trendycator is tested, and used, in Etf and stocks.
  • Trendycator is tested, and used, for long operation only.
  • Trendycator is not tested in different timeframe from what explained above, or chart type different from bars (eg. Renko or Heikin Ashi).
  • Trendycator is not tested in instrument different from what listed above: like future or Forex.
  • Trendycator is not tested for short operation. Normally short have very strong movement in less time that is different from trend following concept.


Entry/Exit recommended filters
Investor and traders are free to use and interpretate Trendycator as they feel more confortable but, we recommend to apply some filters on entry and exit.
As you can see in example, we use a trigger for enter in position (not plotted by this indicator).
The high of first green bar is the trigger level for entry: the long position will be in Buy Stop above this level.
The low of first red bar is the trigger level for exit: the long position will be exit in Stop after this level.
Use this trigger criteria is useful to avoid, once more, the false signal.
*This strategy is including all above recommendations.

captura

Bank charges and slippage
Showed result are only an example and we do not guarantee same results in future.
This result was obtained considering 3 Eur per order as Bank fee, which is in line with the major global online brokers.
We do not consider, in this example, any slippage because, as said before, we neve use and we never tested in future.
We think that when you invest in weekly or daily timeframe in trade that can last for months, few Eur or Dollar of slippage may intentionally not be considered.

Conclusion

Trendycator do not provide any guarantees regarding your ability to obtain results or earn money with our ideas, information, tools or strategies.
Nothing on our content makes any promise or guarantee of future results or earnings.
You alone are responsible for your decisions, actions and results in life, and using our code you agree that you will not attempt to hold us responsible for your decisions, actions or results, at any time, under any circumstances.
Notas de Lançamento
Corrected bug on flag "Activate-Deactivate Target/Stop". Previously Target was deactivated, instead Stop was still working. Today only Trail stop exit + Trendycator red are still working in case of non flag.
Notas de Lançamento
With this update, target line in low rigth corner chart is green highlighted correctly then Target is reached also in case of last < target price.
Notas de Lançamento
Minor correction: corrected Exit on Trendycator red. Before was marked in label as "Trail" now is "Stop"
Notas de Lançamento
Reverse back to previous version
Notas de Lançamento
Corrected bug of Target in case of entry with gap up. Now is correctly calculated from entry price.
Notas de Lançamento
Smal correction on Strategy percentual gain calculation
Notas de Lançamento
The execution table at the bottom right has been completely updated:
-added Entry Price
-divided the multiplication table into two sections to be more clear
-decimals are now self-proportioned to the symbol

Aggiornata completamente la tabella tabellina in basso a destra che riassume i punti salienti delle operazioni in essere:
-aggiunto Entry Price
-divisa tabellina in due sezioni per essere più chiara
-i decimali si auto proporzionano al simbolo
Notas de Lançamento
Aggiornato grafico descrittivo
Notas de Lançamento
Bug correction on TAB automatic decimal
Notas de Lançamento
Bug Correction. Now PercGain and close values on chart are measured on last tick.
circoloinvestitorilongtradeStochastic OscillatorstrategyTrend Analysistrendycator

Script sob convite

O acesso a este script é restrito aos usuários autorizados pelo autor e pode requerir pagamento. Você pode adicioná-lo a seus favoritos, mas só poderá utilizá-lo após solicitar permissão e obtê-la do autor. Contate Trendycator para mais informações, ou siga as instruções do autor abaixo.

Observe que este é um script sob convite privado que não foi analisado pelos moderadores de scripts. Sua adequação as Regras da Casa é indeterminada. O TradingView não sugere pagar por um script e usá-lo, a menos que você confie 100% no seu autor e entenda como o script funciona. Em muitos casos, você pode encontrar uma boa alternativa de código aberto gratuita nos nossos Scripts da Comunidade.

Instruções do autor

To get access go to my website that you find in my profile or message me directly, don't use comment area.

Quer usar esse script no gráfico?

Aviso: por favor leia antes de solicitar acesso.

Aviso legal