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

Ensign Volatility Stop for Amibroker (AFL)
kaiji
about 14 years ago
Amibroker (AFL)

Rating:
2 / 5 (Votes 3)
Tags:
trading system, amibroker, stop loss

The Ensign Volatility Stop converted to work with Amibroker.

Similar Indicators / Formulas

Buy Sell & Trailing SL & TGL
Submitted by morgen about 12 years ago
ATR Stop Loss System
Submitted by esnataraj almost 14 years ago
KPL System
Submitted by na1982 about 14 years ago
Visual ATR Stop Loss System
Submitted by siivaramm over 13 years ago
Chandelier Exit v2 by Geoff Mulhall
Submitted by akxsat about 14 years ago
trailing sl
Submitted by rsuresh13 almost 13 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Ensign Volatility Stop");

// Ensign Volatility Stop
// get the multiple of 9 period EMA of ATR_Ensign
k=Param("multiplication factor", 1,0.5,5,0.1);

period=k*9;
VS_raw = 2.5 * EMA(ATR(1), period);

// for longs, VS line is below price
loline = VS_below_price = HHV(Close, period) - VS_raw;

// for shorts, VS line is above price
hiline = VS_above_price = LLV(Close, period) + VS_raw;
between = IIf (C < hiline AND C > loline, 1, 0);
up = IIf(C > hiline OR (H > Ref(H, -1) AND H > hiline), 1, 0);
dn = IIf(C < loline OR (L < Ref(L, -1) AND L < loline), 1, 0);
upcond = IIf(between AND BarsSince(up) < BarsSince(dn) , 1, 0);
dncond = IIf(between AND BarsSince(dn) < BarsSince(up) , 1, 0);
upline = IIf(up OR upcond, loline, Null);
dnline = IIf(dn OR dncond, hiline, Null);

Plot(C, "", colorLightGrey, styleBar);
Plot(upline, "", colorRed, styleStaircase) ;
Plot(dnline, "", colorGreen, styleStaircase) ;

Buy=upline;
Sell=dnline;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

PlotShapes(Buy*shapeUpArrow,colorGreen);
PlotShapes(Sell*shapeDownArrow,colorRed);

0 comments

Leave Comment

Please login here to leave a comment.

Back