MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Update to MetaTrader 4 build 735 and Test the VPS for Free

avrag 5 fractal روش محاسبه 5 فراکتال آخر --مجید طرفی

Back to topics list To post a new topic, please log in or register
avatar
5
xman1363 2010.03.18 21:31
 






int start()
{
int limit;
int fractal1=45;
int fractal2=49;
int fractal3=2;

int counted_bars= IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//---- macd counted in the 1-st buffer
for(int i=0; i<limit; i++)
{

f1=iFractals(NULL,0, MODE_HIGH,i)+iFractals(NULL,0,MODE_LOW,i);

//Alert(f1);
msg1=iFractals(NULL,0, MODE_HIGH,i);
msg2=iFractals(NULL,0,MODE_LOW,i);

if(f1>0)
{
f3=f3+1;
}
//----------------------------
if (f3==5) //if want frame 1 we ned nubmber 2
{

CrossUp[i]= iFractals(NULL,0, MODE_HIGH,i);
CrossDown[i]=iFractals(NULL,0,MODE_LOW,i);

newname5="magid4";
if (f1>=1)
{
newname6=f1;
ObjectCreate(newname5, OBJ_LABEL, 0, 0, 0);
ObjectSet (newname5,OBJPROP_XDISTANCE,20 );
ObjectSet(newname5,OBJPROP_YDISTANCE,80);
ObjectSetText(newname5, newname6, 10, "Times New Roman", Green);
}
}


//----------------
if (f3==4) //if want frame 1 we ned nubmber 2
{

CrossUp[i]= iFractals(NULL,0, MODE_HIGH,i);
CrossDown[i]=iFractals(NULL,0,MODE_LOW,i);

newname3="magid3";
if (f1>=1)
{
newname4=f1;
ObjectCreate(newname3, OBJ_LABEL, 0, 0, 0);
ObjectSet (newname3,OBJPROP_XDISTANCE,20 );
ObjectSet(newname3,OBJPROP_YDISTANCE,60);
ObjectSetText(newname3, newname4, 10, "Times New Roman", Green);
}
}

//------------------------------
if (f3==2) //if want frame 1 we ned nubmber 2
{

CrossUp[i]= iFractals(NULL,0, MODE_HIGH,i);
CrossDown[i]=iFractals(NULL,0,MODE_LOW,i);

latef1=f1;


newname="magid1";
if (f1>=1)
{
newname0=f1;
ObjectCreate(newname, OBJ_LABEL, 0, 0, 0);
ObjectSet (newname,OBJPROP_XDISTANCE,20 );
ObjectSet(newname,OBJPROP_YDISTANCE,20);
ObjectSetText(newname, newname0, 10, "Times New Roman", Green);

}

}


if (f3==3) //if want frame 1 we ned nubmber 2
{

CrossUp[i]= iFractals(NULL,0, MODE_HIGH,i);
CrossDown[i]=iFractals(NULL,0,MODE_LOW,i);

latef2=f1;


newname1="magid2";
if (f1>=1)
{
newname2=f1;
ObjectCreate(newname1, OBJ_LABEL, 0, 0, 0);
ObjectSet (newname1,OBJPROP_XDISTANCE,20 );
ObjectSet(newname1,OBJPROP_YDISTANCE,40);
ObjectSetText(newname1, newname2, 10, "Times New Roman", Green);
}


}
///*----------

این برنامه با محاسبه مکانی فراکتالها به شما امکان کنترل فراکتالها رو میده
امیدوارم این برنامه برای شما مفید باشه
sirmagid@gmail.com

Attached files:
  magid_fractal_control.mq4  (2.29 KB)
 
Back to topics list  

To add comments, please log in or register