0
Можно на картинке что хотишь?
avatar

AM2

  • 9 февраля 2016, 19:14
+1
Никогда не занимался разгоном, но тут есть над чем поразмышлять. В тестере с 10000 до 2400679. Это получается больше 200 раз можно не туда зайти спокойно и все равно останешься в прибыли.



avatar

AM2

  • 9 февраля 2016, 11:07
+2
Уважаемый Андрей подправьте пожалуста работу советника один сигнал одна сделка об этом писалось в задании только иными словами

В советнике: www.opentraders.ru/downloads/889/ только одна сделка по сигналу. А вот с макдом поправил:




//+------------------------------------------------------------------+
//|                                                         ExBB.mq4 |
//|                                              Copyright 2015, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2015, AM2"
#property link      "http://www.forexsystems.biz"
#property description "BBands expert advisor"

//--- Inputs
extern double Lots         = 0.1;  // лот
extern double KLot         = 2;    // умножение лота
extern double MaxLot       = 5;    // максимальный лот
extern int    StopLoss     = 5000; // лось
extern int    TakeProfit   = 5000; // язь
extern int    StartHour    = 0;    // час начала торговли
extern int    StartMin     = 30;   // минута начала торговли
extern int    EndHour      = 23;   // час окончания торговли
extern int    EndMin       = 30;   // минута окончания торговли
extern int    Shift        = 1;    // сдвиг 
extern int    Slip         = 30;   // реквот
extern int    Magic        = 20;   // магик
extern string IndName      =      "BBands_Stop_v1";
extern string s="------------- Настройки BBands_Stop_v1  -------------";
extern int    Length       = 20;   // период BB 
extern int    Deviation    = 2;    // отклонение ВВ
extern string ss="     ------------- Настройки MACD ------------- ";
extern int    MACD         = 0;    // 0-выкл. 1-вкл.
extern int    Fast         = 12;   // 
extern int    Slow         = 26;   // 
extern int    Signal       = 9;    // 

datetime t=0;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Check for open order conditions                                  |
//+------------------------------------------------------------------+
void PutOrder(int type,double price)
  {
   int r=0;
   color clr;
   double sl=0,tp=0;

   if(type==1 || type==3 || type==5)
     {
      clr=Red;
      if(StopLoss>0)   sl=NormalizeDouble(price+StopLoss*Point,Digits);
      if(TakeProfit>0) tp=NormalizeDouble(price-TakeProfit*Point,Digits);
     }

   if(type==0 || type==2 || type==4)
     {
      clr=Blue;
      if(StopLoss>0)   sl=NormalizeDouble(price-StopLoss*Point,Digits);
      if(TakeProfit>0) tp=NormalizeDouble(price+TakeProfit*Point,Digits);
     }

   r=OrderSend(NULL,type,Lot(),NormalizeDouble(price,Digits),Slip,sl,tp,"",Magic,0,clr);
   return;
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int CountTrades()
  {
   int count=0;
   for(int i=OrdersTotal()-1;i>=0;i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
           {
            if(OrderType()<2) count++;
           }
        }
     }
   return(count);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
double Lot()
  {
   double lot=Lots;

   if(OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY))
     {
      if(OrderProfit()<0)
        {
         lot=OrderLots()*KLot;
        }
     }
   if(lot>MaxLot)lot=MaxLot;
   return(lot);
  }
//+------------------------------------------------------------------+
//| Check for open order conditions                                  |
//+------------------------------------------------------------------+
void OpenPos()
  {
   bool buy,sell;
//--- get Ind
   double BBBlue=iCustom(Symbol(),0,IndName,Length,Deviation,0,Shift);
   double BBRed=iCustom(Symbol(),0,IndName,Length,Deviation,1,Shift);
   double BBBlue2=iCustom(Symbol(),0,IndName,Length,Deviation,0,Shift+1);
   double BBRed2=iCustom(Symbol(),0,IndName,Length,Deviation,1,Shift+1);
   double macd=iMACD(NULL,0,Fast,Slow,Signal,PRICE_CLOSE,MODE_MAIN,Shift);

   if(MACD==0)
     {
      buy  = BBBlue>0 && BBRed2>0;
      sell = BBRed>0 && BBBlue2>0;
     }

   if(MACD==1)
     {
      buy  = BBBlue>0 && BBRed2>0 && macd>0;
      sell = BBRed>0 && BBBlue2>0 && macd<0;
     }

//--- sell conditions
   if(sell)
     {
      PutOrder(1,Bid);
     }
//--- buy conditions
   if(buy)
     {
      PutOrder(0,Ask);
     }
//---
  }
//+----------------------------------------------------------------------------+
//|  Автор    : Ким Игорь В. aka KimIV,  http://www.kimiv.ru                   |
//+----------------------------------------------------------------------------+
//|  Версия   : 30.04.2009                                                     |
//|  Описание : Возвращает флаг разрешения торговли по времени.                |
//+----------------------------------------------------------------------------+
//|  Параметры:                                                                |
//|    hb - часы времени начала торговли                                       |
//|    mb - минуты времени начала торговли                                     |
//|    he - часы времени окончания торговли                                    |
//|    me - минуты времени окончания торговли                                  |
//+----------------------------------------------------------------------------+
bool isTradeTimeInt(int hb=0,int mb=0,int he=0,int me=0)
  {
   datetime db, de;           // Время начала и окончания работы
   int      hc;               // Часы текущего времени торгового сервера

   db=StrToTime(TimeToStr(TimeCurrent(), TIME_DATE)+" "+(string)hb+":"+(string)mb);
   de=StrToTime(TimeToStr(TimeCurrent(), TIME_DATE)+" "+(string)he+":"+(string)me);
   hc=TimeHour(TimeCurrent());

   if(db>=de)
     {
      if(hc>=he) de+=24*60*60; else db-=24*60*60;
     }

   if(TimeCurrent()>=db && TimeCurrent()<=de) return(True);
   else return(False);
  }
//+------------------------------------------------------------------+
//| OnTick function                                                  |
//+------------------------------------------------------------------+
void OnTick()
  {
   if(CountTrades()<1 && isTradeTimeInt(StartHour,StartMin,EndHour,EndMin))
     {
      if(t!=Time[0])
      OpenPos();
      t=Time[0];
     }

   Comment("\n ");
  }
//+------------------------------------------------------------------+

avatar

AM2

  • 9 февраля 2016, 10:15
0
спасибо, но не совсем то. кто-то возьмется написать советника по моему ТЗ?

За заказ с таким объемом работы бесплатно вряд ли кто возьмется. Простые заказы, которые можно быстро сделать делаю согласно условиям: zakaz.opentraders.ru/25597.html
На фрилансе такой заказ будет стоить около 50$.
avatar

AM2

  • 9 февраля 2016, 10:01
+3
Анатолий нам вот здесь еще просемафорил: anatoly74.opentraders.ru/30280.html

avatar

AM2

  • 9 февраля 2016, 00:51
+3
Если условия четко формализуются, то сделать можно. Вот основа. Если волатильность за последние 5 свечей больше чем за 20 ставим стоповые отложки.


//+------------------------------------------------------------------+
//|                                                    ProboyVol.mq4 |
//|                                              Copyright 2016, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, AM2"
#property link      "http://www.forexsystems.biz"
#property version   "1.00"
#property strict

//--- Inputs
extern double Lots      = 0.1; // объем позиции
extern int StopLoss     = 500; // стоп лосс ордера
extern int TakeProfit   = 500; // тейк профит ордера
extern int Delta        = 100; // расстояние от вершин
extern int Expiration   = 10;  // время истечения ордера
extern int Slip         = 3;   // реквот
extern int BarsCount    = 20;  // количество баров канала
extern int Count        = 5;   // количество баров большой волатильности
extern int Magic        = 333; // магик

datetime t=0;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void PutOrder(int type,double price)
  {
   int    r=0;
   color clr=Green;
   double sl=0,tp=0;
   datetime expiration=0;

   if(type==1 || type==3 || type==5)
     {
      clr=Red;
      if(StopLoss>0)   sl=NormalizeDouble(price+StopLoss*Point,Digits);
      if(TakeProfit>0) tp=NormalizeDouble(price-TakeProfit*Point,Digits);
     }

   if(type==0 || type==2 || type==4)
     {
      clr=Blue;
      if(StopLoss>0)   sl=NormalizeDouble(price-StopLoss*Point,Digits);
      if(TakeProfit>0) tp=NormalizeDouble(price+TakeProfit*Point,Digits);
     }

   if(type>1 && Expiration>0) expiration=TimeCurrent()+Expiration*3600;

   r=OrderSend(NULL,type,Lots,NormalizeDouble(price,Digits),Slip,sl,tp,"",Magic,expiration,clr);
   return;
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int CountTrades()
  {
   int count=0;
   for(int i=OrdersTotal()-1;i>=0;i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
           {
            if(OrderType()<2) count++;
           }
        }
     }
   return(count);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int CountOrders(int type)
  {
   int count=0;
   for(int i=OrdersTotal()-1;i>=0;i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
           {
            if(OrderType()==type) count++;
           }
        }
     }
   return(count);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void DelOrder()
  {
   bool d;
   for(int i=OrdersTotal()-1;i>=0;i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
           {
            if(OrderType()>1) d=OrderDelete(OrderTicket());
           }
        }
     }
   return;
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Vol(int count)
  {
   double vol=0;
   for(int i=1;i<=count;i++)
     {
      vol+=(High[i]-Low[i])/(Point*count);
     }
   return((int)vol);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   double h=High[iHighest(NULL,0,MODE_HIGH,Count,0)];
   double l=Low[iLowest(NULL,0,MODE_LOW,Count,0)];

   if(CountTrades()<1 && Vol(Count)>Vol(BarsCount) && t!=Time[0])
     {
      if(CountOrders(4)<1 && Bid<h) PutOrder(4,h);
      if(CountOrders(5)<1 && Bid>l) PutOrder(5,l);
      t=Time[0];
     }

   if(CountTrades()>0) DelOrder();

   Comment("\n Vol: ",Vol(BarsCount),
           "\n Vol2: ",Vol(Count));
  }
//+------------------------------------------------------------------+

avatar

AM2

  • 9 февраля 2016, 00:42
+1
Мне интересно автоматизировать такую штуку.
avatar

AM2

  • 8 февраля 2016, 21:49
+3
Ставлю 100% что не будет 80% если закодить и прогнать по истории :) 
avatar

AM2

  • 8 февраля 2016, 21:01
0
Вручную выставляете в настройках любой уровень.
Кстати по умолчанию у меня так и есть 2 и 98.
extern int Level=2;
avatar

AM2

  • 8 февраля 2016, 20:42
0
Cейчас гляну.
avatar

AM2

  • 8 февраля 2016, 15:34
0
Как обычно присылайте скрины логи.
avatar

AM2

  • 8 февраля 2016, 14:11
0
Я не знаю как вы собираетесь все это использовать, но по ТЗ все есть: www.opentraders.ru/downloads/1041/



//+------------------------------------------------------------------+
//|                                                         Gold.mq4 |
//|                                              Copyright 2016, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, AM2"
#property link      "http://www.forexsystems.biz"
#property version   "1.00"
#property strict

//--- Inputs
extern double Lots         = 0.1;   // лот
extern double KLot         = 2;     // умножение лота
extern double MaxLot       = 5;     // максимальный лот
extern double Depo         = 20000; // увеличенное депо
extern double Sup          = 1000;  // поддержка низы
extern double Res          = 1500;  // сопротивление верхи
extern int    StopLoss     = 5000;  // лось
extern int    TakeProfit   = 5000;  // язь
extern int    Slip         = 30;    // реквот
extern int    Count        = 100;   // максимальное количество поз
extern int    Magic        = 12;    // магик

datetime t=0;
double Price=0;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Check for open order conditions                                  |
//+------------------------------------------------------------------+
void PutOrder(int type,double price)
  {
   int r=0;
   color clr=Green;
   double sl=0,tp=0;

   if(type==1 || type==3 || type==5)
     {
      clr=Red;
      if(StopLoss>0)   sl=NormalizeDouble(price+StopLoss*Point,Digits);
      if(TakeProfit>0) tp=NormalizeDouble(price-TakeProfit*Point,Digits);
     }

   if(type==0 || type==2 || type==4)
     {
      clr=Blue;
      if(StopLoss>0)   sl=NormalizeDouble(price-StopLoss*Point,Digits);
      if(TakeProfit>0) tp=NormalizeDouble(price+TakeProfit*Point,Digits);
     }

   r=OrderSend(NULL,type,Lots,NormalizeDouble(price,Digits),Slip,sl,tp,"",Magic,0,clr);
   return;
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int CountTrades()
  {
   int count=0;
   for(int i=OrdersTotal()-1;i>=0;i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
           {
            if(OrderType()<2) count++;
           }
        }
     }
   return(count);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Last()
  {
   int result=0;
   if(OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY))
     {
      if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
        {
         if(OrderProfit()>0)
           {
            result=1;//tp  
           }
        }
     }
   return(result);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void CloseAll()
  {
   bool cl;
   for(int i=OrdersTotal()-1;i>=0;i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
           {
            if(OrderType()==OP_BUY) cl=OrderClose(OrderTicket(),OrderLots(),Bid,Slip,Blue);
            if(OrderType()==OP_SELL) cl=OrderClose(OrderTicket(),OrderLots(),Ask,Slip,Red);
           }
        }
     }
   return;
  }
//+------------------------------------------------------------------+
//| OnTick function                                                  |
//+------------------------------------------------------------------+
void OnTick()
  {
   if(AccountEquity()>Depo)
     {
      CloseAll();
      return;
     }
     
   if(CountTrades()<Count)
     {
      if(Bid>Sup && Bid<Res)
        {
         if(CountTrades()<1)
           {
            PutOrder(1,Bid);
            PutOrder(0,Ask);
            Price=Bid;
           }

         if(Last()==1 && (Bid>Price+TakeProfit*Point || Bid<Price-TakeProfit*Point))
           {
            PutOrder(1,Bid);
            PutOrder(0,Ask);
            Price=Bid;
           }
        }
     }

   Comment("\n Equity: ",DoubleToStr(AccountEquity(),Digits));
  }
//+------------------------------------------------------------------+
<
avatar

AM2

  • 8 февраля 2016, 13:25
0
Нужно еще устанавливать индикаторы, см. выше. В папке только советник.
avatar

AM2

  • 8 февраля 2016, 13:13
0
VAHVAH не стой стороны


Это сделал. Устранил ошибку модификации 1, 130. Поставил на отладку на демо.
www.opentraders.ru/downloads/1034/
avatar

AM2

  • 8 февраля 2016, 10:59
0
Чужой код непросто править, мало кто за это берется.
avatar

AM2

  • 8 февраля 2016, 10:02
0
Открывает закрывает как положено. Лот тоже увеличивает.
www.opentraders.ru/downloads/1039/

avatar

AM2

  • 7 февраля 2016, 21:32
0
Завтра я начну делать с тем что есть.
avatar

AM2

  • 7 февраля 2016, 18:43