Trendoscope

Breakout Trend Trading Strategy - V1

Trendoscope Wizard 已更新   
Strategy in nutshell:

This strategy is made to be used in daily time-frames. Works better on trending instruments where volume is available. Hence, this is more suitable for trending shares rather than currencies, commodities and indexes where volume data is either not present or not reliable.

Breakout signifies the continuation of trend. Hence, trade in the direction of breakouts. Breakouts are calculated based on high volume and price movement in a day. This will be combined with few other conditions to generate buy and sell signals along with stop and compound targets. Supertrend is used for trend bias. Our buy and sell targets do not directly depend on the bias. But, entry criteria in opposite trend is made much difficult than that of trend direction. Further explanation of method and input parameters are explained below.


Backtesting parameters :

Capital and position sizing : Capital and position sizing parameters are set to test investing 2000 wholly on certain stock without compounding.

Initial Capital : 2000
Order Size : 100% of equity
Pyramiding : 1

ExitOnSignal : If unchecked exit is triggered solely on trailing stop

Trade Direction : Long, Short or All. Short condition is riskier than long conditions and often results in losses as per my observation. On most of the stocks trending up, strategy will not generate any short signals. This is achieved by comparing yearly high lows to previous two years to decide whether to allow short or long entries.

allowImmediateCompound : Applicable only if compounding/pyramiding is enabled in trade. If checked allows to place compounding orders immediately. If unchecked, it waits for stopline to cross order price before placing next compound.

Display Mode :

Targets: Whenever breakout happens, show marker for upTarget and downTarget
TargetChannel: Show up target and downtarget as a channel
Target With Stop: Along with targets, show also stop levels for breakouts
Up Channel : Channel created from UpTarget and respective stops
Down Channel : Channel created from DownTarget and respective stops

ShowTrailingStop : Shows trailing stop and compound lines when there is a trading position.

ShowTargetLevels : Shows Buy Sell target levels along with stop and compound lines. Trades are done as market orders. Hence, target levels are displayed after strategy makes the trade. Since only one order allowed per side without compounding, target, stop and compound levels are shown sometimes even without trade being made. These can be considered as entry levels if there is no existing position.

ShowPreviousLevels : Shows previous buy/sell target levels. When enabled, layout can look messy.

StopMultiplyer: To Set trailing stop loss.

BacktestYears: Number of years to include in backtest


So far my test cases are:

Positive : AAPL, AMZN, TSLA, RUN, VRT, ASX:APT
Negative Test Cases: WPL, WHC, NHC, WOW, COL, NAB (All ASX stocks)
Special test case: WDI

Negative test cases still show losses in backtesting. I have attempted including many conditions to eliminate or reduce the loss. But, further efforts has resulted in reduction in profits in positive cases as well. Still experimenting. Will update whenever I find improvements. Comments and suggestions welcome :)
版本注释:
Minor corrections
版本注释:
Slight change in trailing stop loss. Trail once in 3 days.
版本注释:
  • Added more conditions for entry if instrument trade history is loss. Entries are made lenient for profitable instruments.
  • Update logic for trailing stop not to trail immediately. Stops are now trailed only after reaching compound period
版本注释:
  • Added compound multiplier to enable separate calculation of compound line
  • Changed logic for crossed compound for pyramiding orders. It now waits for price to cross compound level before looking for compound opportunity.
  • Changed display layout for target signals. Stop, compound is always shown if there is a position

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?