что вы скажите об этом советнике????
extern int o = 9;
extern int ticks = 180;
extern double Risk = 0.05;
extern int begin = 10;
extern int end = 5;
double Lots = 0.1;
double mas[500];
extern int mag = 0;
extern int doliv_sell=20;
extern int doliv_buy=20;
extern int razgruz=3;
extern bool BUYTRADE=true;
extern bool SELLTRADE=true;
int init() {
int li_4;
int li_0 = ArrayRange(mas, 0);
if (li_0 - 1 != ticks) li_4 = ArrayResize(mas, ticks);
int li_8 = ArrayRange(mas, 0);
return (0);
}
int start()
{
//ДОЛИВ---------------------------------------------------
if (OrdersTotal()>0)
{int B_M=0;
double b_max=0.0;
double b_v=0.0;
double buy_bu=0.0;
int S_M=0;
double s_min=1000000.0;
double s_v=0;
double sell_bu=0.0;
for (int i = 0; i < OrdersTotal(); i++){
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
bool B_O=OrderSymbol() == Symbol() && OrderMagicNumber() == mag;
if ( B_O && OrderType() == OP_BUY)
{ B_M++;
b_v+=OrderLots();
buy_bu+=OrderOpenPrice()*OrderLots();
if (OrderOpenPrice()>b_max)b_max=OrderOpenPrice();
}
if ( B_O && OrderType() == OP_SELL)
{ S_M++;
s_v+=OrderLots();
sell_bu+=OrderOpenPrice()*OrderLots();
if (OrderOpenPrice()<s_min)s_min=OrderOpenPrice();
}
}
if (s_v!=0) sell_bu/=s_v;
if (b_v!=0) buy_bu/=b_v;
if (doliv_buy!=0)
if (MathFloor((b_max-Ask)/(doliv_buy*Point)-B_M+1)>0)
{OrderSend(Symbol(),OP_BUY,b_v,Ask,0,0,0,0, mag, 0, CLR_NONE);
}
if (doliv_sell!=0)
if (MathFloor((Bid-s_min)/(doliv_sell*Point)-S_M+1)>0)
{OrderSend(Symbol(),OP_SELL,s_v,Bid,0,0,0,0, mag, 0, CLR_NONE);
}
}
//---------------------------------------------------------------------
double H_price;
double L_price;
int pos = 0;
bool BUYLMT = FALSE;
bool SELLLMT = FALSE;
bool BUYMRKT = FALSE;
bool SELLMRKT = FALSE;
double STOPLEV = MarketInfo(Symbol(), MODE_STOPLEVEL);
double SPR = MarketInfo(Symbol(), MODE_SPREAD);
Lots = (MathCeil(AccountBalance()*10 / Close[0] * Point * AccountLeverage() / 2.0 * Risk) - 1.0) / 100.0;
if (Lots > 100.0) Lots = 100;
if (Lots < 0.01) Lots = 0.01;
if (OrdersTotal() > 0) {
for (pos = 0; pos < OrdersTotal(); pos++) {
OrderSelect(pos, SELECT_BY_POS, MODE_TRADES);
bool BOOL_ORDER=OrderSymbol() == Symbol() && OrderMagicNumber() == mag;
if ( BOOL_ORDER && OrderType() == OP_BUYLIMIT) BUYLMT = TRUE;
if ( BOOL_ORDER && OrderType() == OP_SELLLIMIT) SELLLMT = TRUE;
if ( BOOL_ORDER && OrderType() == OP_BUY) BUYMRKT = TRUE;
if ( BOOL_ORDER && OrderType() == OP_SELL) SELLMRKT = TRUE;
}
}
if (mas[0] == 0.0) ArrayInitialize(mas, Close[0]);
for (int li_36 = ticks; li_36 > 0; li_36--) mas[li_36] = mas[li_36 - 1];
mas[0] = Close[0];
double ArMax = mas[ArrayMaximum(mas)];
double ArMin = mas[ArrayMinimum(mas)];
if (OrdersTotal() > 0) {
for (pos = 0; pos < OrdersTotal(); pos++) {
OrderSelect(pos, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == mag && OrderType() == OP_BUYLIMIT && BUYMRKT == TRUE || (Hour() < begin - 1 && Hour() > end)) OrderDelete(OrderTicket());
if (OrderSymbol() == Symbol() && OrderMagicNumber() == mag && OrderType() == OP_SELLLIMIT && SELLMRKT == TRUE || (Hour() < begin - 1 && Hour() > end)) OrderDelete(OrderTicket());
}
}
if ((ArMax - ArMin) / Point < o) {
H_price = ArMin + o * Point;
L_price = ArMax - o * Point;
}
if ((ArMax - ArMin) / Point >= o) {
H_price = ArMax;
L_price = ArMin;
}
Comment(H_price, " ", L_price, " ", (H_price - L_price) / Point);
if (Hour() > begin - 1 || Hour() < end) {
if (BUYMRKT == FALSE && BUYLMT == FALSE && Ask - STOPLEV * Point >= L_price + SPR * Point) {
if (BUYTRADE)
OrderSend(Symbol(), OP_BUYLIMIT, Lots, L_price + SPR * Point, 10, 0, H_price, 0, mag, 0, CLR_NONE);
Print(GetLastError());
}
if (SELLMRKT == FALSE && SELLLMT == FALSE && Bid + STOPLEV * Point <= H_price) {
if (SELLTRADE)
OrderSend(Symbol(), OP_SELLLIMIT, Lots, H_price, 10, 0, L_price + SPR * Point, 0, mag, 0, CLR_NONE);
Print(GetLastError());
}
}
for (pos = 0; pos < OrdersTotal(); pos++) {
OrderSelect(pos, SELECT_BY_POS, MODE_TRADES);
if (OrderMagicNumber() == mag && OrderType() == OP_BUYLIMIT && OrderSymbol() == Symbol()) {
if (OrderOpenPrice() != L_price + SPR * Point || OrderTakeProfit() != H_price) {
// Print("mod BL");
OrderModify(OrderTicket(), L_price + SPR * Point, 0, H_price, 0, CLR_NONE);
// Print("mbl ", GetLastError());
}
}
if (OrderMagicNumber() == mag && OrderType() == OP_SELLLIMIT && OrderSymbol() == Symbol()) {
if (OrderOpenPrice() != H_price || OrderTakeProfit() != L_price + SPR * Point) {
// Print("mod SL");
OrderModify(OrderTicket(), H_price, 0, L_price + SPR * Point, 0, CLR_NONE);
// Print("msl ", GetLastError());
}
}
//-----Разгруз-------
double h1=H_price;
double l1=L_price;
//if ((razgruz>0)&&((B_M>1)||(S_M>1)))
if (razgruz>0)
{
if (B_M>1)
H_price=buy_bu+razgruz*Point;
if (S_M>1)
L_price=sell_bu-razgruz*Point-SPR * Point;
}
//-------------------
if (OrderMagicNumber() == mag && OrderType() == OP_BUY && OrderSymbol() == Symbol()) {
if (OrderTakeProfit() != H_price) {
// Print("mod B");
OrderModify(OrderTicket(), OrderOpenPrice(), 0, H_price, 0, CLR_NONE);
// Print("mb ", GetLastError());
}
}
if (OrderMagicNumber() == mag && OrderType() == OP_SELL && OrderSymbol() == Symbol()) {
if (OrderTakeProfit() != L_price + SPR * Point) {
// Print("mod S");
OrderModify(OrderTicket(), OrderOpenPrice(), 0, L_price + SPR * Point, 0, CLR_NONE);
// Print("ms ", GetLastError());
}
}
H_price=h1;
L_price=l1;
}
return (0);
}
как он вообще написан??? торгует нормально,но слидить оч сильно надо!!!)Ночной скальпель по EUR\CHF