Voland-Z, просьба добавить в 1й коммент под описанием советника свежие скрины:
1) панель сов. в окне графика
2) вкладка Параметры советника.
<code>extern int Type = 1; // 1-Buy,2-Sell extern int Try = 5; // количество попыток выставить ордер</code>
<code>//+------------------------------------------------------------------+
//| ScriptLocker.mq4 |
//| jonxxx |
//| http://pitforex.com/ |
//+------------------------------------------------------------------+
#property copyright "jonxxx"
#property link "http://pitforex.com/"
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
void start()
{
double Lots=0;
for(int i=0;i<OrdersTotal();i++)
{
if(!OrderSelect(i,SELECT_BY_POS))
continue;
if(OrderSymbol()!=Symbol())
continue;
if(OrderType()==OP_BUY)
Lots+=OrderLots();
if(OrderType()==OP_SELL)
Lots-=OrderLots();
}
if(Lots>0)
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0,NULL,Red);
if(Lots<0)
OrderSend(Symbol(),OP_BUY,-(Lots),Ask,3,0,0,NULL,Blue);
}
//+------------------------------------------------------------------+</code>
<code>extern double Start = 1.1; // цена старт ордера</code>
<code>extern int Type = 0; // 0-Buy,1-Sell extern int Try = 5; // количество попыток выставить ордер</code>
<code>extern int EndHour = 23; // час окончания торговли extern int EndMin = 30; // минута окончания торговли</code>
preasto