INVITE-ONLY SCRIPT

[Trendycator] Trendycator Strategy L/S

Aggiornato
This script is different from [Trendycator] Trendycator Strategy because of long/short trades possibility.

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.
istantanea

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 either long and short.
-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
istantanea

Important methodology note

This code will reverse long the position in case of open position is short but do not reverse short in case of open trade is long.

istantanea

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).
-Target Short: you can set the target as percentage from entry level Short, eg. 10 mean 10% (this work only if activated).
-Protection Stop Fix Short: you can set the main stop as percentage from entry Short level, eg. 10 mean 10% (this work only if activated).
-Dynamic Volatility Stop Short: you can set the Trailing Stop Short 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.

istantanea

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.

istantanea

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.
Note di rilascio
Final version with graphic Gain indication
Note di rilascio
Hided debug
Note di rilascio
Chart Updated
Note di rilascio
Note di rilascio
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
Note di rilascio
Bug Correction. Now PercGain and close values on chart are measured on last tick.
circoloinvestitoriTrend Analysistrendycator

Script su invito

L'accesso a questo script è riservato agli utenti autorizzati dall'autore, solitamente dietro pagamento di una commissione. Puoi aggiungerlo ai preferiti, ma sarai in grado di utilizzarlo solo una volta ricevuto il via libera da parte dell'autore. Per ulteriori informazioni, contatta Trendycator o segui le istruzioni dell'autore riportate di seguito.

Si prega di notare che questo è uno script privato, ad invito, che non è stato analizzato dai moderatori degli script. La sua conformità al Regolamento è da considerarsi imprecisata. TradingView non suggerisce di pagare per uno script e di utilizzarlo a meno che non ci si fidi al 100% del suo autore e non si comprenda il suo funzionamento. In molti casi, è possibile trovare gratuitamente una buona alternativa open-source nei nostri Script della comunità.

Istruzioni dell'autore

Solo su invito su http://www.trendycator.it

Vuoi usare questo script sui tuoi grafici?

Attenzione: leggi prima di richiedere l'accesso.

Anche su:

Declinazione di responsabilità