суббота, 12 мая 2018 г.

Elder triple screen trading system afl


Triple Screen Trading System - Part 4.
The triple screen trading system is based on employing the best of both the trend-following indicators and oscillators to make trading decisions. Traders are primarily concerned with any realized divergences between the readings of a longer-term trend-following indicator such as a weekly moving average convergence divergence (MACD) histogram and the relatively shorter-term reading from an oscillator such as force index, Elder-Ray, stochastic or Williams %R.
The fourth section of this series will examine the means by which a trader would use the Elder-Ray oscillator as the market wave, which is the second screen of the trader's triple screen system.
Second Screen - Elder-Ray.
By using a longer-term trend-following indicator, perhaps a weekly MACD histogram, traders can identify the direction of the longer-term trend. Bull power and bear power are then used to find trades on the daily charts that move in the same direction as the weekly trend. The triple screen earns its "screening" label because it eliminates all signals but those in the direction of the trend: if the weekly trend is up, only buy signals are returned from Elder-Ray. If the weekly trend is down, only Elder-Ray sell signals are considered.
When bear power is negative but rising, bears are showing a bit of strength but are beginning to slip once again. By placing a buy order above the high of the last two days, your stop order will be filled only if the rally continues. Once you have gone long, you can protect your position with a stop below the latest minor low.
Bullish divergences between bear power and price (average consensus of value) represent the strongest buy signals. If prices fall to a new low but bear power shows a higher bottom, prices are falling and bears become weaker. When bear power moves up from this second bottom, you can comfortably buy a larger number of shares than you typically would in your usual position.
You can also use Elder-Ray to determine the best time to sell your position. By tracking the pattern of peaks and valleys in bull power, you can ascertain the power of bulls. By stacking the peaks in actual price against the peaks in bull power, you can determine the strength of the uptrend - if every new peak in price comes along with a new peak in bull power, the uptrend is safe. When prices reach a new high but bull power reaches a lower peak than that of its previous rally, the bulls are losing their power and a sell signal is issued.
If bull power is already negative, selling short is inappropriate because bears have control over the market bulls. If you short sell in this condition, you are effectively betting that bears have sufficient strength to push bulls even farther under water. Furthermore, as in the case discussed above, wherein the trader holds a long position during positive bear power, you are betting on the greater fool theory.
When bull power is positive but falling, the bulls have managed to grasp a bit of strength but are beginning to sink once again. If you place a short order below the low of the last two days, you receive an order execution only if the decline continues. You can then place a protective stop above the latest minor high.
Bearish divergences between bull power and prices (average consensus of value) give the strongest shorting signals. If prices hit a new high but bull power hits a lower top, the bulls are weaker than before, and the uptrend may not continue. When bull power inches down from a lower top, you can safely sell short a larger-than-usual position.
You can also determine when to cover your short positions on the basis of a reading of Elder-Ray. When your longer-term trend is down, bear power will indicate whether bears are becoming stronger or weaker. If a new low in price occurs simultaneously with a new low in bear power, the current downtrend is relatively secure.
A bullish divergence issues a signal to cover your shorts and prepare to enter into a long position. Bullish divergences occur when prices hit a new low and bear power hits an even shallower bottom, when bears are losing their momentum and prices are falling slowly.
For both long and short positions, divergences among bull power, bear power and prices indicate the best trading opportunities. In the context of the long-term trend indicated by our first market screen, Elder-Ray identifies the moment when the market's dominant group falters below the surface of the trend .

Elder triple screen trading system afl


The ultimate porfolio management solution.
WiseTrader Toolbox.
Modified Triple Screen Trading System for Amibroker (AFL)
Triple Screen System is further refined by long term EMA , non trending stocks are filtered by ADX , RSI is used to filter out the overbought and oversold issues. Furthermore, u can modify these settings as per ur wish.
Similar Indicators / Formulas.
Indicator / Formula.
5 comments.
How to activate to see charts? Remove // from which lines?
No it needs to be put in.
yup, i can’t see the chart too, please help.

Elder triple screen trading system afl


Description: Trading System.
// User-defined parameter for EMA periods.
EMA_prds = Param("EMA_periods", 7, 1, 30, 1);
Std_MACD = Param("Standard MACD? No-0, Yes-1", 1, 0, 1, 1);
Plot_fashion = Param("Bar+Arrows-1, Impulse Bars-2", 2, 1, 2, 1);
WR_P1 = Param("Weekly Ribbon Location", -10.5, -1000, 1000, 0.1);
WR_P2 = Param("Weekly Ribbon Height", 366.5, -0.001, 500, 0.1);
MR_P2 = Param("Monthly Ribbon Height", 199, -0.001, 500, 0.1);
// Compute EMA and MACD Histogram.
DayEMA = EMA(Close, EMA_prds);
DayEMA = TEMA(Close, EMA_prds);
// Line below to be used with Jurik JMA.
// DayEMA = JurikJMA(C, EMA_Prds);
MACD_val = MACD(5, 8);
Signal_val = Signal(5, 8, 5);
MACD_val = MACD(12, 26);
Signal_val = Signal(12, 26, 9);
// Determine if we have an Impulse UP, DOWN or None.
Impulse_Up = DayEMA > Ref(DayEMA, -1) AND Histogram > Ref(Histogram, -1);
Impulse_Down = DayEMA < Ref(DayEMA, -1) AND Histogram < Ref(Histogram, -1);
Impulse_None = (NOT Impulse_UP) AND (NOT Impulse_Down);
wh_falling = DayEMA < Ref(DayEMA, -1) AND Histogram < Ref(Histogram, -1);
MACD_val = MACD(5, 8);
Signal_val = Signal(5, 8, 5);
Hist_in_m = MACD_val - Signal_val;
mh_falling = Hist_in_m < Ref(Hist_in_m, -1);
wh_falling = TimeFrameExpand( wh_falling, inWeekly, expandLast);
mh_rising = TimeFrameExpand(mh_rising, inMonthly, expandLast);
mh_falling = TimeFrameExpand(mh_falling, inMonthly, expandLast);
mkol = IIf( mh_rising, colorBlue, IIf(mh_falling, colorYellow, colorLightGrey));
if (Plot_fashion == 1)
Plot(Close, "Close", colorTeal, styleBar);
PlotShapes(shapeUpArrow * Impulse_Up, colorBrightGreen, 0, Low, -12);
PlotShapes(shapeDownArrow * Impulse_Down, colorRed, 0, High, -12);
PlotShapes(shapeSmallCircle * Impulse_None, colorWhite, 0, High, 5);
bar_kol = IIf(impulse_UP, colorBrightGreen, IIf(impulse_Down, colorRed, colorCustom11));
Plot(C, "Close", bar_kol, styleBar);
Plot(10, "Monthly Ribbon", mkol, styleOwnScale|styleArea|styleNoLabel, MR_P1, MR_P2); // Monthly Trend BLUE = RISING, YELLOW = FALLING, WHITE = NEUTRAL.
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
P = ParamField( "Price field" );
Plot( Zig(P, change), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
MACDw = MACD( 12, 26 ) - Signal( 12, 26, 9 );
MACDwLINE = MACD( 12, 26 ) ;
MACDwSignal = Signal( 12, 26, 9 );
Plot(MACDw,"MACD Weekly",Color, styleHistogram | styleThick);
Plot(MACDwLINE,"MACD Weekly Line",colorRed, styleLine);
Plot(MACDwSignal,"MACD Weekly Signal Line",colorBrightGreen, styleLine);
WEEKLY FORCE INDEX 13day MA.
periods = Param("Periods", 13, 1, 100, 1);
FI_kol = IIf(fi < 0, colorRed, colorBrightGreen);
Plot(FI, "Force Index", FI_kol, styleLine|styleThick);
Plot(0,"", colorViolet, styleLine | styleThick | styleNoLabel);
EncodeColor(colorWhite) + " - Force Index - " + WriteVal(periods, 1) + " days," +
EncodeColor(colorBlue) + "Force Index = " +
EncodeColor(colorWhite) + WriteVal(FI, 1.2);
Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram ), 2 );
DAILY CHART WITH WEEKLY IMPULSE SYSTEM.
EMA_prds = Param("EMA_periods", 7, 1, 30, 1);
Std_MACD = Param("Standard MACD? No-0, Yes-1", 1, 0, 1, 1);
Plot_fashion = Param("Bar+Arrows-1, Impulse Bars-2", 2, 1, 2, 1);
// Allow user to define Weekly and Monthly Ribbon Location and Height.
WR_P1 = Param("Weekly Ribbon Location", 5.2, -1000, 1000, 0.1);
WR_P2 = Param("Weekly Ribbon Height", 199, -0.001, 500, 0.1);
//MR_P2 = Param("Monthly Ribbon Height", 199, -0.001, 500, 0.1);
// Compute EMA and MACD Histogram.
DayEMA = EMA(Close, EMA_prds);
DayEMA = TEMA(Close, EMA_prds);
// Line below to be used with Jurik JMA.
// DayEMA = JurikJMA(C, EMA_Prds);
Impulse_Up = DayEMA > Ref(DayEMA, -1) AND Histogram > Ref(Histogram, -1);
Impulse_Down = DayEMA < Ref(DayEMA, -1) AND Histogram < Ref(Histogram, -1);
Impulse_None = (NOT Impulse_UP) AND (NOT Impulse_Down);
// Note: uses "non-standard" parameters!
MACD_val = MACD(5, 8);
Signal_val = Signal(5, 8, 5);
MACD_val = MACD(12, 26);
Signal_val = Signal(12, 26, 9);
wh_falling = Hist_in_w < Ref(Hist_in_w, -1);
wh_none = (NOT wh_rising) AND (NOT wh_falling);
MACD_val = MACD(5, 8);
Signal_val = Signal(5, 8, 5);
Hist_in_m = MACD_val - Signal_val;
mh_falling = Hist_in_m < Ref(Hist_in_m, -1);
wh_falling = TimeFrameExpand( wh_falling, inWeekly, expandLast);
wh_none = TimeFrameExpand( wh_none, inWeekly, expandLast);
mh_rising = TimeFrameExpand(mh_rising, inMonthly, expandLast);
mh_falling = TimeFrameExpand(mh_falling, inMonthly, expandLast);
mkol = IIf( mh_rising, colorBlue, IIf(mh_falling, colorYellow, colorLightGrey));
if (Plot_fashion == 1)
Plot(Close, "Close", colorTeal, styleBar);
PlotShapes(shapeUpArrow * Impulse_Up, colorBrightGreen, 0, Low, -12);
PlotShapes(shapeDownArrow * Impulse_Down, colorRed, 0, High, -12);
PlotShapes(shapeSmallCircle * Impulse_None, colorWhite, 0, High, 5);
bar_kol = IIf(impulse_UP, colorBrightGreen, IIf(impulse_Down, colorRed, colorCustom11));
Plot(C, "Close", bar_kol, styleBar);
//Plot(10, "Monthly Ribbon", mkol, styleOwnScale|styleArea|styleNoLabel, MR_P1, MR_P2); // Monthly Trend BLUE = RISING, YELLOW = FALLING, WHITE = NEUTRAL.
Middle = EMA( C, AvgPd ) ;
Rng = HHV( H, LookBkPd ) - LLV( L, LookBkPd ) ;
Over = H > Middle + X ;
Under = L < Middle - X ;
OuterPct = 100*( Sum( Over, LookBkPd ) + Sum( Under, LookBkPd )
X=X+sign( OP - ExternalBarPct )*deltaX ;
>while ( abs( OP - ExternalBarPct ) > ConvergePct ) ;
Plot( Middle, "MA", colorYellow, styleLine|styleNoTitle ) ;
Plot( Middle+X, "MA", colorSkyblue, styleDashed|styleNoTitle ) ;
Plot( Middle-X, "MA", colorSkyblue, styleDashed|styleNoTitle ) ;
// Determine if Impulse status is bullish, neutral or bearish. Display as Text Column.
Impulse_State = WriteIf(Impulse_Up, "Bulllish", WriteIf(Impulse_Down, "Bearish", "Neutral"));
Impulse_Col = IIf(Impulse_Up, colorGreen, IIf(Impulse_Down, colorRed, colorLightGrey));
Weekly_Trend = WriteIf(wh_rising, "Rising", WriteIf(wh_falling, "Falling", "Flat!"));
Weekly_Col = IIf(wh_rising, colorGreen, IIf(wh_falling, colorRed, colorLightGrey));
Monthly_Trend = WriteIf(mh_rising, "Rising", WriteIf(mh_falling, "Falling", "Flat!"));
Monthly_Col = IIf(mh_rising, colorGreen, IIf(mh_falling, colorRed, colorLightGrey));
bars_in_bull = Min(BarsSince(impulse_none), BarsSince(impulse_down));
bars_in_bear = Min(BarsSince(impulse_up), BarsSince(impulse_none));
bars_in_neut = Min(BarsSince(impulse_down), BarsSince(impulse_up));
// actual Impulse Status - Bullish, Bearish or Neutral.
bars_in_state = IIf(Impulse_Up, bars_in_bull, IIf(Impulse_down, bars_in_bear, bars_in_neut));
AddTextColumn(Impulse_State, "Impulse Status", 1, colorWhite, Impulse_Col);
AddColumn(bars_in_state, "Bars in this state", 1, colorWhite, Impulse_col);
AddTextColumn(Weekly_Trend, "Weekly Trend", 1, colorWhite, Weekly_Col);
AddTextColumn(Monthly_Trend, "Monthly Trend", 1, colorWhite, Monthly_Col);
P = ParamField( "Price field" );
Plot( Zig(P, change), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
MACDw = MACD( 12, 26 ) - Signal( 12, 26, 9 );
MACDwLINE = MACD( 12, 26 ) ;
MACDwSignal = Signal( 12, 26, 9 );
Plot(MACDw,"MACD Daily",Color, styleHistogram | styleThick);
Plot(MACDwLINE,"MACD Daily Line",colorRed, styleLine);
Plot(MACDwSignal,"MACD Dail Signal Line",colorBrightGreen, styleLine);
DAILY FORCE INDEX 2DAY MA.
FI_kol = IIf(fi < 0, colorRed, colorBrightGreen);
Plot(FI, "Force Index", FI_kol, styleLine|styleThick);
Plot(0,"", colorViolet, styleLine | styleThick | styleNoLabel);
EncodeColor(colorWhite) + " - Force Index - " + WriteVal(periods, 1) + " days," +
EncodeColor(colorBlue) + "Force Index = " +
EncodeColor(colorWhite) + WriteVal(FI, 1.2);
Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram ), 2 );
Val = IIf(Val1>Val2, Val1, Val2) ;
Avgval = Median(Val, 22);
Plot(T, _DEFAULT_NAME(), color, styleHistogram | styleThick);
P = ParamField("Price field",-1);
Periods = Param("Periods", 22, 2, 200, 1, 10 );
_SECTION_BEGIN("Bull Power EMA");
Lookback = Param ("EMA Lookback",13);
BullPower = High - EMA(Close, Lookback);
Plot (BullPower, "", ParamColor ("Color", colorCustom11), styleHistogram );
Title = Name() + " " + Date() + " Bull Power" + WriteVal (Lookback, 3.0) + " Day: " + WriteVal (BullPower, 5.3);
_SECTION_BEGIN("Bear Power EMA");
Lookback = Param ("EMA Lookback", 13);
BearPower = Low - EMA(Close, Lookback);
Plot (BearPower, "", ParamColor ("Color", colorRed), styleHistogram );
Title = Name() + " " + Date() + " Bear Power" + WriteVal (Lookback, 3.0) + " Day: " + WriteVal (BearPower, 5.3);
ELDER TRIPLE SCREEN SCAN.
// Coded by Dennis Skoblar 7/05/2005.
// Derrived from "Trading For A Living" and "Come Into My Trading Room" by Alexander Elder.
// help confirm the weekly direction. It should be rising along with an uptick on the Weekly MACD Histogram to go long. However, Elder writes that divergences in the MACD.
// Histogram override the EMA. The Daily 2 Period Force Index will be below it's Zero Line. Look for the stock to pullback to around it's Daily 13 Period EMA. Also use the.
// Daily 22 Period EMA to confirm the direction of the daily trend. Do the opposite for shorts. Use the Long/Short EMA Weekly Direction Tabs as filters to cull through the.
// scan to only display the Weekly EMA going in the intended trading direction. Use the Long/Short Elder Ray Tabs (BullPower AND BearPower) to fine tune the entry signals.
// This tab is best used when in agreement with the Long/Short EMA Weekly Direction Tabs. A 50 Period EMA > 100000 is used to Filter Volume. A minimum of a 5 point run in.
// one Month is used as a Filter for a stock's range. This scan is best used as an Exploration.
WeeklyMACD = MACD(12,26) - Signal(12,26,9);
WeekHistRising = Ref(WeeklyMACD, -1) < Ref(WeeklyMACD, 0);
WeekHistFalling = Ref(WeeklyMACD, -1) > Ref(WeeklyMACD, 0);
WeeklyForceIndexLong = FIWeekly > 0;
WeeklyForceIndexShort = FIWeekly < 0;
FILongD = FIDaily < 0;
FIShortD = FIDaily > 0;
VFilter = EMA(V,50) > 100000;
TenTwentyFilter = HHV(H,20)-LLV(L,20); // How much price has gone in one month (>=10 points preferable)
FiftyDayHVFilter = round(StDev(log(C/Ref(C,-1)),50)*100*sqrt(256)); // One year volotility (>=40 preferable)
bullpower= High - EMA(Close,13);
bearpower= Low - EMA(Close,13);
ElderLong = MACDLongW AND FILongD AND FILongW;
ElderShort = MACDShortW AND FIShortD AND FIShortW;
Column0Name = "Ticker name";
Column3Name = "Long EMA Weekly Direction";
Column4Name = "Long Elder Ray Filter";
Column7Name = "Short EMA Weekly Direction";
Column8Name = "Short Elder Ray Filter";
Column10Name = "One Month Point Range";
Column11Name = "Historical Volotility 50 Day";

Elder triple screen trading system afl


The ultimate porfolio management solution.
WiseTrader Toolbox.
Elder Triple Screen Trading System for Amibroker (AFL)
Formula Name : Elder Triple Screen Trading System.
Author : Dennis Skoblar ( id : DennisAndLisasbcglobal)
The Credit goes to the Author : Dennis Skoblar, who created this formula/system.
The formula contains some instructions, do read it and then proceed!
For Charts : cut and paste the chart/indicator to it’s own window with it’s own file name and remove the Remark Slashes “//”, except for the first line, this line describes the chart function. Example…leave “//Weekly Bar Chart” from the following first line as as.
Similar Indicators / Formulas.
You must be a member.
7 comments.
Following error reported.
Yeah that happens on some stocks. I don’t have enough time to debug this and fix it so if someone knows how to fix it please say so.
Here’s the corrected snippet of code -
The problem was occurring because of usage of ‘abs’ function in the ‘while’ loop which gave rise to the fact that the ‘abs’ value of algorithm for some stocks was always above the reference value.
However, be aware that this formula looks into the future!
Excellent work mike works a treat now :).
Glad to be able to help :)
hello any one tray to put alert i have formula but work in this AlertIf( Buy, “”, "BUY triggered for " + Name() + " at price Rs."+WriteVal(C,5.2), 1,1+2 );
this formula work other indicator so tray to set in formula.

Комментариев нет:

Отправить комментарий