Help me to set my level line

Posted By xafresh Tuesday, August 27, 2013
Add to Favorites1
Author Message
xafresh
 Posted Tuesday, August 27, 2013
Supreme Being

Supreme Being - (342 reputation)Supreme Being - (342 reputation)Supreme Being - (342 reputation)Supreme Being - (342 reputation)Supreme Being - (342 reputation)Supreme Being - (342 reputation)Supreme Being - (342 reputation)Supreme Being - (342 reputation)Supreme Being - (342 reputation)

Group: Forum Members
Last Active: Thursday, September 05, 2013
Posts: 1, Visits: 14
342
I have indicator that usefull for me in mt4. i want to used it for me in act... but i confuse how to do it. Can't admin help me? Where i can get fully tutorial Act Algo?
Thanks


int start()
{
string textls, textlr, labels,labelr,namels,namelr;


double D = balance(PERIOD_D1);
double W = balance(PERIOD_W1);
double M = balance(PERIOD_M1);
double Piv = (D+W+M)/3;
double Sp = MathSqrt((MathPow(D-Piv,2)+MathPow(W-Piv,2)+MathPow(M-Piv,2))/2);
plotline("PivL","PivLa","L0",Piv,White);

for(int n=1; n<=7;n++)
{
textls="SLine"+n;
textlr="RLine"+n;
labels="SLabel"+n;
labelr="RLabel"+n;
namels="Ls"+n;
namelr="Lr"+n;
plotline(textls,labels,namels,Piv-n*Sp,Blue);
plotline(textlr,labelr,namelr,Piv+n*Sp,Red);
}






return(0);
}

//--------------------------------------------------------------------+

//+----------------procedure to calculate pivot for any timeframe--------------------------------------------------+
double balance(int periode )
{
double
double Hi,Lo,Op,Cl,DifUp,DifDw,SUp,SDw,Sp,Piv;

Hi=iHigh(NULL,periode,1);
Lo=iLow(NULL,periode,1);
Cl=iClose(NULL,periode,1);
Piv = (Hi+Lo+Cl)/3;

return (Piv);

}
---------------------procedure to draw line in chart-----------
void plotline(string lname, string llabel, string ltext, double value, color col)
{
ObjectCreate(lname, OBJ_HLINE,0, CurTime(),value);
ObjectSet(lname, OBJPROP_COLOR, col);
ObjectSet(lname, OBJPROP_LEVELSTYLE, STYLE_DOT);

ObjectCreate(llabel, OBJ_TEXT, 0, Time[0]+10*Period()*60, value);
ObjectSetText(llabel, ltext, 8, "Script Bold ", col);

}


Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top