+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

Mabiuts Triangle

Mabiuts Triangle AFL, empowered by amibroker data feed, identifies triangular patterns within price movements. By utilizing real-time data feeds, this AFL assists traders in recognizing potential breakout or reversal points based on these specific triangular formations.

/
_SECTION_BEGIN("MABIUTS");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

_SECTION_BEGIN("Trend Check");
P1 = Param("Short Period",7,0,100,1);
P2 = Param("Long Period",65,0,100,1);
L1=Param("Threshold",4,2,10,1);
U= MA(C,P1)-MA(C,P2);
R=100*U/MA(C,P2);
ap=Optimize("ADX Period",20,5,30,1);
MyADX=ADX(ap);
Len=Optimize("Length",10,1,30,1);
dp=Optimize("Diff Period",20,5,50,1);
Vs=ParamToggle("Select Indicator","Ravi,ADX",1);
if(Vs)
	{
	ta = MyADX;
		}
else
	{
	ta=R;
	}
EmaIndex=IIf(Len>0,2/(1+Len),0.20);
Diff=HHV(ta,dp)-LLV(ta,dp);
Myconst=IIf(Diff>0,(ta-LLV(ta,dp))/Diff,EMAIndex);
Newconst=IIf( MyConst > EmaIndex , EmaIndex, MyConst); 
y=AMA(C,Newconst);
Plot(y,"Trend Check",colorLightGrey);
_SECTION_END();
// this section only for finding expectancy, can be skipped
SetCustomBacktestProc(""); 

if( Status("action") == actionPortfolio ) 
{ 
    bo = GetBacktesterObject(); 

    bo.Backtest(); 

    st = bo.GetPerformanceStats(0); 
       expectancy = st.GetValue("WinnersAvgProfit")*st.GetValue("WinnersPercent")/100 + 
                st.GetValue("LosersAvgLoss")*st.GetValue("LosersPercent")/100; 

        bo.AddCustomMetric( "Expectancy ($)", expectancy ); 
} 

// end of expectancy calculation


PositionScore=100/C;
PositionSize = - 20;
SetBarsRequired(10000, 10000);
SetFormulaName("MABIUTS System");

Buy=y>Ref(y,-1); //AND  Cross (C,Peak(C,5,1));
Sell= y < Ref(y,-1);
Short = Sell;
Cover = Buy;

//Cross (EMA(EMA(C,13),6),EMA(C,13));
PlotShapes(Buy*shapeUpTriangle,colorGreen);
PlotShapes(Sell*shapeDownTriangle,colorGreen);

SetTradeDelays(1, 1, 1, 1);

Open chat
1
Hi, how can I help you?