Awesome Hull Trick AFL Needdd

#1
I need AFL for this HULL Trick (Sean bro trick)

Requirements 4 indicators

1. Awesome indicator ( Default setting)
2. Bollinger Band (Default setting)
3. Hull Moving indicator ( change setting from 9 to 22)
4. EMA ( Change setting from 9 to 55)


Time frame

 15 min / 30 min for intraday
 Hourly / Daily for positional trades Once the above indicators are set in chart then look for following condition

When price is trading in narrow range,
 1st condition – Look for awesome indicator to confirm trend ( Positive for upmove / Negative for downmove)
 2nd condition – Wait for Bollinger band to expand. In case of upmove, the 22 day HULL will trail the upper band while the price continues its up move. In case of downmove, the 22 day HULL will trail the lower band while the price continues its down move.
 3rd Condition – HULL MA crosses 55 day EMA from below then there is a buy / sell signal

As the HULL keeps trailing the price and Bollinger band upwards, use the HULL as your trailing SL

In case of downwards, wait for Awesome indictor to go from +ve to –ve . Then wait for Bollinger band to expand and then HULL crossover from above with 55 day EMA and use HULL as your trailing SL.

When awesome indicator is in down trend, BB expands and Price trading below HULL line and 55 EMA then stage is set for down move. S

Similarly when awesome indicator is in up trend, BB expands and price trading above HULL line and 55 EMA then stage is set for Up move.

Trade to be taken only if all the above conditions are met. Otherwise do not trade.
In the below nifty chart, Price is trading in narrow range and Awesome indicator is about to turn positive. See the magic in next chart.

upload_2018-1-16_19-3-47.png


When the awesome indicator turned positive, Bollinger band expands and when the price crosses over 55

EMA then boooommmm !!!!



upload_2018-1-16_19-4-21.png
 
#2
function HullMaFunction( P, Periods, Delay )
{
X = 2 * WMA(C,round(22/2)) - WMA(C,22);
HullMA = WMA(X,round(sqrt(22)));
HullMA = Ref(HullMA,-Delay);
return HullMa;
}

PlotPriceField = ParamToggle("PriceField","HIDE|SHOW",1);
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Delay = Param("Delay", 0, 0, 10, 1 );
HullMA = HullMaFunction( P, Periods, Delay );
if( PlotPriceField ) Plot(C,"",1,128);
Plot( HullMA, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ),
ParamStyle("Style") );

Plot(BBandBot( C,20,2 ),"",colorLightGrey,styleThick+styleNoTitle, Null, Null, Null, -1);
Plot(BBandTop( C,20,2 ),"",colorLightGrey,styleThick+styleNoTitle, Null, Null, Null, -1);
//Plot( BBandTop( C, 20,2), colorGreen, styleDashed );
//Plot( BBandBot( C, 20, Width2 ), colorGreen, styleDashed);


Plot( EMA( C, 55 ), _DEFAULT_NAME(), colorRed, ParamStyle("Style") );

Buy= Cross(HUllMa,EMA(C,55));
Sell= Cross(EMA(C,55),HullMa);

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone) ,colorBlue);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorBlue);
 
#6
function HullMaFunction( P, Periods, Delay )
{
X = 2 * WMA(C,round(22/2)) - WMA(C,22);
HullMA = WMA(X,round(sqrt(22)));
HullMA = Ref(HullMA,-Delay);
return HullMa;
}

PlotPriceField = ParamToggle("PriceField","HIDE|SHOW",1);
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Delay = Param("Delay", 0, 0, 10, 1 );
HullMA = HullMaFunction( P, Periods, Delay );
if( PlotPriceField ) Plot(C,"",1,128);
Plot( HullMA, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ),
ParamStyle("Style") );

Plot(BBandBot( C,20,2 ),"",colorLightGrey,styleThick+styleNoTitle, Null, Null, Null, -1);
Plot(BBandTop( C,20,2 ),"",colorLightGrey,styleThick+styleNoTitle, Null, Null, Null, -1);
//Plot( BBandTop( C, 20,2), colorGreen, styleDashed );
//Plot( BBandBot( C, 20, Width2 ), colorGreen, styleDashed);


Plot( EMA( C, 55 ), _DEFAULT_NAME(), colorRed, ParamStyle("Style") );

Buy= Cross(HUllMa,EMA(C,55));
Sell= Cross(EMA(C,55),HullMa);

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone) ,colorBlue);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorBlue);

thanks for quick help....i have modified it more as bolligner band expansion is not considered in your code which i have considered



Period = Param("Period",22,1,100,1);
Hull = WMA( 2*WMA(C,int(Period/2))- WMA(C,Period),int(sqrt(Period)));

Plot(C,"close",6,64);

Plot( Hull, _DEFAULT_NAME(), ParamColor( "Color", colorGreen ), ParamStyle("Style") );

Plot(EMA(C,55), "55 ema", colorRed,style=1);

Title = EncodeColor(colorGold)+ " TRICK" + EncodeColor(colorRose)+" (" + Name() + ") " + EncodeColor(colorGold)+ Interval(2) +
" " + Date() +" " +" • Open "+WriteVal(O,1.2)+" • "+"Hi "+WriteVal(H,1.2)+" • "+"Lo "+WriteVal(L,1.2)+" • "+
"Close "+WriteVal(C,1.2)+" Hull "+WriteVal(hull,1.2)+" EMA-55 "+WriteVal(EMA(C,55),1.2);



P = ParamField("Price field",-1);
Periods = Param("Periods", 20, 2, 300, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style );
Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style );

bbt=BBandTop(p,periods,width);
bbb=BBandBot(p,periods,width);
diff=bbt-bbb;
perdiff=(diff/bbt)*100;
AO = MA(Avg, 5) - MA(Avg, 34);

AOUpBar = AO > Ref(AO, -1);
AODownBar = AO < Ref(AO, -1);
Buy= aoupbar AND Cross(perdiff,10) AND (HUll>EMA(C,55)) ;

PlotShapes(Buy*shapeUpArrow,colorYellow, 0, Low,Offset =-12);
 

Similar threads