Вы находитесь на странице: 1из 2



KPL Swing (breakout trading system)

The KPL Swing is a simple trend following mechanical trading system which automates the entry and exit. The trading system is extremely simple and easy to use, works across multiple time frames and does not require any in-depth knowledge of TA. It is somewhat similar to the turtle trading system.

The trading or investing logic is simple.... buy new highs (strength) and sell new lows (weakness). The default entry or decision level for long positions is a close above 20 days highest high. No targets are given as profits are unknown and is whatever the market gives. Losses are predefined in advance before taking a trade. Caveat: this indicator works best with indices and highly liquid stocks. It is not recommended for stocks with poor liquidity.

How to use indicator in Amibroker:

Sample chart in: 5 min - 15 min - 30 min - 60 min - Daily

Download formula file (right click with mouse) kpl_swing.afl and save in C:/Program files/Amibroker/Formulas/Custom folder. Save the file with name kpl_swing.afl Start Amibroker and click on View/ Charts. Open the Custom folder and you should see the "kpl_swing" indicator file. Double click the file and the indicator will automatically load in a seperate pane/window Default value of N is 20. You can change this via the Parameters dialog box. Higher values of N will give fewer but far more reliable trades and vice versa.


Timeframe: works across all time frames (15min, daily, weekly etc). Smaller timeframes can generate high number of trades and whipsaws in rangebound markets. Entry trade: Initiate a long trade when indicator generates a BUY signal (arrow) Stoploss: user defined; keep atleast 5% or recent swing low or support level. You can use the same code in Scanner mode to generate Buy/ Sell signals.

Stoploss and Exit Strategy (delivery):

The kplswing indicator has no target because you can never know with certainity if a stock will give 100, 200 or 500% return in a year. But by staying in a trade as long as possible, you vastly improve the chances of atleast capturing a significant percentage of the big move. Initial stoploss: 10% from entry price or recent swing low (long positions) or low of signal bar (tight, can lead to whipsaws). Exit strategy:

Exit if stock closes below initial stoploss (entry level) or Indicator gives a sell or Stock loses more than 5% in a single day or Stock loses more than 10% from the most recent high (long positions). Exit after 20 / 30 days as long as initial stoploss is not broken.

Above example is for delivery trades. You can modify the logic for different timeframes and for the short side.

Position sizing - How much quantity to buy?

Quantity to buy = (1% of trading capital) / (Purchase Price - Stoploss) Eg. Assume an initial trading capital of Rs.100,000/- and a risk per trade of 1% or Rs.1,000/-. You want to buy a stock trading at Rs.100/- with a stoploss Rs.90. The quantity you should buy is 1000/(100-90) = 100 shares. You are investing Rs.10,000/- and if your stoploss gets hit, your maximum loss will be Rs.1.000/-. Another example. In above example, say the stoploss is Rs.95. The quantity you should buy is 1000/(100-95) = 200 shares. You are now investing Rs.20,000/- and if your stoploss gets hit, your maximum loss is still Rs.1.000/-. It is obvious that with every stoploss your trading capital is reducing by Rs.1,000/-. After 80 consecutive losses, you still have Rs.20,000/- left! In reality, a good mechanical system should give excellet profits in your 2nd or 3rd trade itself (unless the stock is rangebound in which case it will be obvious).