/*
??? ????????:
?????? ??? ?????????? ?????? ?? ??????? ???? ?? ?????????? netstep
???? ???? ?? ??? ???????????, ?? ?????? ???????
?????? ??? ???? ?????????? ? ??????????? ???????? ???? ?? ?????????? netstep, ?? ? ????? ?????????? ?? mul
? ?.?. ?? ??? ??? ???? ?? ????????? ?????????? ??????? ?????? maxtrades ??? LotLim
? ?????? ????? ????? ? ??????? ? ??????????? ????, ?.?. ?????? ??????? ????? ? ?? ????? ?? ?????
??????? maxtrades, ?????, ??????? ??????? ?? ????????????? ?????, ? mul ?? ???? ?????? ???? ?????? ????, ????? ?? ???? ??????????? ????? ?? ????? ?????
??????? ??????? ???????? ????????? ???????? ? ??????????? ?????????? ?????????? ???? ??????????
?? ?????
?? ??????? 1 ??? ?????? ????????? ????????? ???? ?? eurusd (???????? ????), ????????? ???????? ?????????????? ?? ?????? 01.01.2008 - 01.11.2008.
??????? ????????? ???????? ? ????????? ??? ?????? ? ?????? ???????? 2007 ????, ??? ? ?????????????? ????????
????????? ?? ??????? ? ??? ???? ?????????? ???? ??????? ??? ?? ????? ? ??? ???????????? ?????.
???????? ????????:
1. ??????? ????????, ????? ????????? ??????? ?? ?????? ????? ???? ??????????? ????? ????????? ??????, ????? ??? ?????, ??????? ??????????? (?? ?????????? ? ????)
2. ? ???? ???? ??????? ???? ?????? ?? ?????, ?? ??????? ?? ????? ???????? ?? ????? ????????? ??????? ...
(????????, ?? ????? fxstart ?? ????????????? ?????? (? ??????? ?????????), ? ?? forex4u ??? ??)
???? ?????????? ?? ????? ??????, ????????? ? ???????????.
?????????? ???????????? ????????, set ????? ??? ?????? ????????????, ????????? ??????
??????? ?? ???? ????????? ??? ?????????, ???? ??? ??????? ??????? ??? ? ??? ???? ???????? ????????? ??????.
? ? ?????? ???? ????? ???? ??????? ????????? !
(?? ?????? ??? ?? ???????/??????, ? ?????? ??? IMHO ?????? ?????(?) ????? ?? ??? ?????)
??????, ???? ??? ????? ???? ?????????, ?? ??? ??? (351 ??)
(??????? ? ???????? ? ?????? ?????, ??? ????? ??????)
*/
extern string g1="???????? ?????????";
extern int netstep=23;
extern int sl=115;
extern int tp=300;
extern int TrailingStop=75;
extern double mul=1.7;
extern int trailprofit=1; // ??????????? ?? ??????
extern string gg="?????????? ????????";
extern int mm=2;
extern double Lots=1;
extern double LotLim=7;
extern int maxtrades=4;
extern double percent=10;
extern double minsum=5000;
extern int bezub=0; // ???? 1, ??????????? ????? ? ?????????
extern int deltalast=5; // ???? ????? ?????????? ????????? ?????? ???? ??????? ?? 5 ??????? ? ?????? ???????, ?? ????????? ? ?????????
extern string bq="???????";
extern int usema=0;
extern int MovingPeriod = 100;
extern int MovingShift = 0;
extern string bb="???????????? ??????????";
extern int chas1=0; // ???? ??????
extern int chas2=24;
extern int per=0; // ?????? ? ?????
extern int center=0; // 0 - ??????? ?? ????? ?????????, 1- ??????? ?? ??????
extern int c10=10; // ???????????? ??? ?????????? ?????
extern int c20=10000; // ???????????? ??? ?????????? ???
int oldtr=0;
double nulpoint=0;
int init()
{
// код доступен только после оплаты
}
int deinit()
{
return(0);
}
int start()
{
// код доступен только после оплаты
}
if (oldtr>TrailingStop) {TrailingStop=oldtr;}
if (mm==1)
{
double lotsi=MathCeil(AccountBalance()/1000*percent/100);
LotLim=lotsi;
for(int t=1;t<=maxtrades;t++)
{
lotsi=lotsi/mul;
}
lotsi=MathRound(lotsi*c10)/c10;
Lots=lotsi;
}
if (mm==2)
{
lotsi=Lots;
for(t=1;t<=maxtrades;t++)
{
lotsi=lotsi*mul;
}
LotLim=lotsi;
}
if(DayOfWeek()==0 || DayOfWeek()==6) return(0);// ?? ???????? ? ???????? ???.
if(AccountFreeMargin()<minsum) // ?????? ?????????
{
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
if (OrdersTotal()<1) // ???????? !
{
if (Hour()<chas1 || Hour()>(chas2) || chas1>chas2) return(0);// ????? ? ?????????
if (per>0 && center==0)
{
double ssmax=High[1];
double ssmin=Low[1];
for (int x=2;x<=per;x++)
{
if (ssmax < High[x]) ssmax=High[x];
if (ssmin > Low[x]) ssmin=Low[x];
}
if (Ask>=ssmax || Ask<=ssmin)
{
int ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,Ask+netstep*Point,3,Ask+netstep*Point-sl*Point,Ask+netstep*Point+tp*Point,"BUYSTOP",0,0,Green);
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,Bid-netstep*Point,3,Bid-netstep*Point+sl*Point,Bid-netstep*Point-tp*Point,"STOPLIMIT",0,0,Green);
}
}
if (per>0 && center==1)
{
ssmax=High[1];
ssmin=Low[1];
for (x=2;x<=per;x++)
{
if (ssmax < High[x]) ssmax=High[x];
if (ssmin > Low[x]) ssmin=Low[x];
}
if (Ask==(ssmax+ssmin)/2 || Bid==(ssmax+ssmin)/2)
{
ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,Ask+netstep*Point,3,Ask+netstep*Point-sl*Point,Ask+netstep*Point+tp*Point,"BUYSTOP",0,0,Green);
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,Bid-netstep*Point,3,Bid-netstep*Point+sl*Point,Bid-netstep*Point-tp*Point,"STOPLIMIT",0,0,Green);
}
}
if (per==0)
{
ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,Ask+netstep*Point,3,Ask+netstep*Point-sl*Point,Ask+netstep*Point+tp*Point,"BUYSTOP",0,0,Green) ;
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,Bid-netstep*Point,3,Bid-netstep*Point+sl*Point,Bid-netstep*Point-tp*Point,"STOPLIMIT",0,0,Green);
}
}
int cnt=0;
int mode=0;
double buylot=0;double buyprice=0;double buystoplot=0;double buystopprice=0;double buylimitlot=0;double buylimitprice=0;
double selllot=0;double sellprice=0;double sellstoplot=0;double sellstopprice=0;double selllimitlot=0;double selllimitprice=0;
double buysl=0;double buytp=0;double sellsl=0;double selltp=0;
int bt=-1;int bst=-1;int blt=-1;int st=-1;int sst=-1;int slt=-1;
if (OrdersTotal()>0)////////////////////////////////////////////////////////////////Показано первые 50% кода (символов: 9092)
Введите ваш email и нажмите кнопку, чтобы перейти к оплате.