Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Stop-loss Indicator Bands for Amibroker (AFL)
kaiji
almost 15 years ago
Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:

Simple stop-loss bands calculated by ATR periods (Variable) with highest high and lowest Low value over (variable) the preceding periods. Stop loss level for short positions deduced from highest high value periods and Stop Loss for longs fm Lowest low value periods.

AFL code by Prakash Shenoi

Screenshots

Indicator / Formula

Copy & Paste Friendly
/* Stop Loss indicator  */
/* AFL code by Prakash Shenoi */

/* Simple stop-loss bands calculated by ATR periods (Variable) with highest
high and lowest Low value 
over (variable) the preceding periods. Stop loss level for short positions
deduced from
highest high value periods and Stop Loss for longs fm Lowest low value periods.
*/

pdsshort=Param("pds short",1,10,55);
pdslong=Param("pds long",1,10,55);
Ststop=HHV(H,pdsshort)-ATR(pdsshort);
Lgstop=LLV(L,pdslong)+ ATR(pdslong);
Plot (Close,"Close",colorBlack,styleCandle);
Plot (Ststop," SL for shorts ",colorGreen,styleDots|styleNoLine);
Plot (Lgstop," SL for longs ",colorRed,styleDots|styleNoLine);

0 comments

Leave Comment

Please login here to leave a comment.

Back