Kpl swing indicator. need afl to convet in mt4.
Hi. i am new in the system. do anyone knows about KPL swing (breakout trading system). can anyone convert this afl into mt4.
HaOpen = AMA( Ref( HaClose, -1 ), .40);
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
xDiff = (HaHigh - Halow) * IIf(StrFind(Name(),"JPY"),100,10000);
barcolor = IIf(HaClose >= HaOpen, colorGreen, colorRed);
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle );
//Copyright Kamalesh Langote. :kplvfmdirect. More details at KPL Swing (breakout trading system)
//Save indicator as "kplswing. afl" in C: program files > Amibroker > Formulas > Custom folder and then drap and drop on price chart.
no=Param( "Swing", 20, 1, 55 );
tsl_col=ParamColor( "Color", colorCycle );
Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase); // or styleaArea.
KPL Swing (breakout trading system)
The KPLSwing indicator is a simple trend following mechanical trading system which automates the entry and exit.
The trading system is extremely simple and easy to use and removes emotions from trading.
The trading or investing logic is simple. buy on close above 20 days high and sell on close below 20 days low.
No targets are given as profits are unknown and is whatever the market gives. Losses are limited via position sizing.
Caveat : this indicator works best with indices and highly liquid stocks. It is not recommended for stocks with poor liquidity (for that matter, any indicator).
Basic logic/ concept.
When any stock has to rally, it has to cross some levels. This can be prior resistance, last week's or month's highs etc etc. Here I have chosen 20 days high as the reference level. Why 20 days? Because there are 20 trading days in a month.
You can of course choose some other number like 30 or 55 etc. The concept remains the same.
Now the outcome of any trade is random so any trade has a 50% chance of succeding. This holds true for any system and statistically speaking, over a large number of trades (a million?), the success will veer towards 50%.
By same logic, beware of any system or analyst who claims an exceptionally high success rate!
So how is money made?
First you need to understand why people lose money. There are only 2 reasons (a) trading beyond one's capacity and (b) holding to loss making positions for long time while 'booking profits' urgently in winning positions.
Put differently, to make money, you need to (a) limit the max loss in any trade to under 1% of your trading capital and (b) follow strict stoplosses and trail profits where trade is in your favour.
If you cannot do the above, then you will better off doing something else in life.
About whipsaws.
All indicators give whipsaws and the KPLSwing indicator is no exception. But it is easy to know when a signal is likely to generate a whipsaw.
The first warning will be where the stock is trading in a small range for a long time. Here it is possible to get a buy signal today followed by a sell signal in next few days.
The second is where a buy signal is generated near a known/ significant resistance.
Ditto for the sell side.
Now the indicator in action - same stock, different charts. 4-5 years.
Installing the indicator:
You must have Amibroker installed in your PC. If you do not have this, download a trial version from Amibroker. 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. Drag and drop the indicator on the price/ chart pane/ window.
Entry trade: Initiate a long trade when indicator generates a BUY signal (arrow). Exit trade if stock loses 10% in a day or breaks recent support or indicator generates a sell. 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: Min 10% from entry price or recent swing low (long positions) or low of signal bar (tight, can lead to whipsaws).
Exit if stock closes below initial stoploss (entry level) or Stock loses more than 10% from the most recent high (long positions) or. Indicator gives a sell.
If you do not have Amibroker:
Vist any of these sites. Eg. ChartINK - Icharts - Trading View Consider previous month's high / low as decision making levels. Buy on close above previous month's high. Position sizing will take care of the risk.
Risk management / Position sizing - How much quantity to buy?
This is the most neglected aspect of trading and the reason why most people lose money on a regular basis.
In the stock market, everyone likes to know how much money they can make. No one asks how much they can lose.
So it makes sense you predefine your loss - this will help manage a trade. It does not matter if your trades are wrong.
Half your trades are anyway bound to fail (statistically speaking) so following this simple rule will automatically limit losses and help you stay in the market.
If you cannot quantify the loss before taking a trade, stay away from stock markets and do something else.
Position sizing answers the question: how much quantity should you trade.
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/-.
Let's assume your stoploss gets hit.
You are now left with Rs.99,000/- and for the next trade, your loss per trade is Rs.990/-.
In above example, say the stoploss is Rs.95. The quantity you should buy is 990/(100-95) = 180 shares. You are now investing Rs.18,000/- and if your stoploss gets hit, your maximum loss is still Rs.990/-.
The capital for the next trade is 99,000-990=98,010/-. Note that your capital is reducing but the rate of reduction will also reduce.
It is obvious that this simple exercise will ensure that you still stay in the game and have a good chance of a profitable trade.
Kpl swing trading system. bobbyroelect. com/kplswing/. 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.
What It Takes to Be a Profitable Trader Part 1 by Adam Khoo.
Kpl swing trading system. heikin ashi with KPL system - Largest database of free formulas, indicators, oscillators and trading systems for Amibroker (AFL), Metastock, eSignal (EFS), and NinjaTrader. Rating: 4 / 5 (Votes 11). Tags: trading system, amibroker, heikin. heikin ashi combination with KPL swing making it very powerful swing trading system.
A trend following trading system which manages entry and exit for any stock and gives excellent returns with minimum whipsaws. The system overcomes the limitations of systems based on moving averages, stochastics, macd etc. It is slightly more advanced than the Donchian breakout system which the Turtles followed. Variants of this are in use all over the net.
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. I developed this years ago and I am using this system for more than a year with fantastic results This indicator is also used in autogenerated reports and stock technicals. In trading, one does not know know how high or how low the markets can move. Traditional TA tools can provide 'targets' but there is no guarantee if the targets will be achieved.
Advanced TA helps but this becomes complex, is subjective and dependent on the skills of the user. Historical support and resistances are of no use as these invariably get broken in periods of strong moves. The cruz of the system lies in riding the trend, avoiding whipsaws, exiting loss making trades fast and letting profits run in good trades. Obviously it calls for good self control and discipline.
Risk management is built-in. This means, before taking a trade you know how much you can lose; profits are unknown. This is in direct contrast to the way a retail investor trades everyone wants to know the profits; no one wants to know the stoploss! Entry rules are extremely simple: This is logical in the sense that if the markets had a strong trend for some time, it is a matter of time it settles into rangebound trade before continuing in the previous direction or reversing.
Incidentally, the whipsaws or false trades are significantly less than moving average crossovers, macd and stochastics. Note that trade can still be positional as hourly charts will keep you in a trade for days whereas 5 min charts can give 1 or 2 signals everyday. The breakout trading system has no provision for targets as it is a trend following system. As no one knows how high or how low markets can move, gains are locked in with a trailing stoploss.
This means you shd automatically ignore all previous known supports or resistances. Experienced traders will realize that historical supports or resistances are invariably broken in periods of strong moves. In any trend following system, previous levels are immaterial. If a stock has to rally, it will break whatever levels it encounters. Sometime the trend will change and a trailing stoploss will gracefully take you out of a trade.
This works best with indices and stocks with excellent liquidity. Stocks with poor market depth can be mean freak trades will distort the value of the breakout level 20 day high or low. Chances of a second whipsaw are rare but nevertheless do occur in stocks which are rangebound for significant periods of time.
You shd then trade only the stock breaks out from this range. Let's assume a capital of Rs. You want to buy a stock of Rs. So if your stoploss gets hit, you shd exit and your max loss will be Rs.
Position sizing is extremely important from the risk management and stoploss management perspective. Unfortunately no one follows this and retail investors alway want to know how much they can earn Hemant Parikh at The messages and ideas posted on this website are user's own views. Data delayed 15 to 20 minutes unless otherwise indicated. Login to participate in discussion.
KPL's breakout trading system.
From : Hemant at 11:14 PM - May 20, 2009 ( )
A trend following trading system which manages entry and exit for any stock and gives excellent returns with minimum whipsaws.
The system overcomes the limitations of systems based on moving averages, stochastics, macd etc. It is slightly more advanced than the Donchian breakout system (which the Turtles followed). Variants of this are in use all over the net.
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.
I developed this 2-3 years ago and I am using this system for more than a year with fantastic results. so the backtesting (if it can be called) has been done with real money and not with paper trades. This indicator is also used in autogenerated reports and stock technicals.
Caveat: like any trading system, it works best with indices and highly liquid stocks.
Amibroker AFL is posted at the end of this page.
Methodology and logic.
In trading, one does not know know how high or how low the markets can move. Traditional TA tools can provide 'targets' but there is no guarantee if the targets will be achieved. Advanced TA helps but this becomes complex, is subjective and dependent on the skills of the user.
Historical support and resistances are of no use as these invariably get broken in periods of strong moves.
The cruz of the system lies in riding the trend, avoiding whipsaws, exiting loss making trades fast and letting profits run in good trades. Obviously it calls for good self control and discipline.
Risk management is built-in. This means, before taking a trade you know how much you can lose; profits are unknown. This is in direct contrast to the way a retail investor trades (everyone wants to know the profits; no one wants to know the stoploss!).
Entry rules.
Entry rules are extremely simple:
- Initiate a new trade when the stock closes for the first time above (below) the 20 days high (low).
- Skip the trade if the previous trade was profitable (whether traded or not).
Explanation: if the last trade (long or short) was highly profitable, then the next trade is likely to whipsaw and shd therefore be skipped (refer sample charts). This is logical in the sense that if the markets had a strong trend for some time, it is a matter of time it settles into rangebound trade before continuing in the previous direction or reversing.
Incidentally, the whipsaws or false trades are significantly less than moving average crossovers, macd and stochastics.
Exit rules.
Intraday charts: use 20 N swing for both entry and exit. Note that trade can still be positional as hourly charts will keep you in a trade for 4-5 days whereas 5 min charts can give 1 or 2 signals everyday.
EOD charts: use a "hard stoploss" of 5% or 10% followed by 10 day swing to ride the trend and lock in profits.
The breakout trading system has no provision for targets as it is a trend following system. As no one knows how high or how low markets can move, gains are locked in with a trailing stoploss. This means you shd automatically ignore all previous known supports or resistances. Experienced traders will realize that historical supports or resistances are invariably broken in periods of strong moves.
In any trend following system, previous levels are immaterial. If a stock has to rally, it will break whatever levels it encounters. Sometime the trend will change and a trailing stoploss will gracefully take you out of a trade.
This works best with indices and stocks with excellent liquidity. Stocks with poor market depth can be mean freak trades will distort the value of the breakout level (20 day high or low).
Multiple whipsaws: the system will stop you from trading the first whipsaw (as the previous trade was profitable). Chances of a second whipsaw are rare but nevertheless do occur in stocks which are rangebound for significant periods of time. You shd then trade only the stock breaks out from this range.
Note on position sizing.
Position sizing answers the question: how much quantity I shd trade?
Let's assume a capital of Rs.100,000/- and a risk appetite of 2% for a trade (Rs.2,000/-). You want to buy a stock of Rs.100/- with a 10% stoploss (Rs.10). The quantity you shd trade is 2000/10=200 shares. So if your stoploss gets hit, you shd exit and your max loss will be Rs.2000/-.
Position sizing is extremely important from the risk management and stoploss management perspective. Unfortunately no one follows this and retail investors alway want to know how much they can earn. they never ask how much they can lose..
Комментариев нет:
Отправить комментарий