May 15, 2014

Simple AFL for trailing stoploss

Here is a simple AFL which plots the trailing SL for any stock.

Default SL is 5% though I recommend setting 10% for delivery trades.


I have not kept any code for SL for a short trade... this is left as an exercise for the end user.


Following chart shows trailing SL (black line) for a stock.. wherever you click the mouse, the SL will be pointed at that bar.

If you are long, you can continue trailing the SL with the condition that the SL will only increase.

For eg., here you bought TATA MOTORS on breakout ... your SL is 375


New high made... SL increased to 388


Latest SL 400


No comments:

Post a Comment

Share this...