0
на скринах работы советника покажите что доработать
avatar

AM2

  • 3 января 2019, 09:15
0
посмотрю сегодня
avatar

AM2

  • 2 января 2019, 14:43
0
скорее всего счет центовый

с центовыми счетами только бесплатные сигналы
avatar

AM2

  • 2 января 2019, 14:37
0
попросите специалиста написать вам тз на индикатор
avatar

AM2

  • 30 декабря 2018, 13:24
0
мне мягко говоря очень непросто понять то что вы хотите :) 
avatar

AM2

  • 30 декабря 2018, 13:22
0
количество дней сделал. для нескольких сделок нужно перекраивать всю логику.

extern int Shift = 3;  // число дней

www.opentraders.ru/downloads/2200/
avatar

AM2

  • 29 декабря 2018, 20:08
0
А можно сделать так, что бы тейки выставлялись на уровне как на скрине. т.е если взять фибо то это уровни 0,25 и 0,75

такая функция есть. ставьте тейк 0.

и что бы открывались 2 сделки, если первая сделка не была закрыта

а этот момент подробнее опишите
avatar

AM2

  • 28 декабря 2018, 20:48
+1
индикатор превращается превращается :D 



www.opentraders.ru/downloads/2200/

avatar

AM2

  • 26 декабря 2018, 21:05
0
обратитесь к платному
avatar

AM2

  • 25 декабря 2018, 21:05
0
Андрей почему чётко не считает

потому что на глаз измерял
avatar

AM2

  • 25 декабря 2018, 20:07
0
считает только законченный квартал, текущий не считает.
вот мои примерные расчеты:

avatar

AM2

  • 24 декабря 2018, 22:18
0
у меня начинает считать с законченного квартала. он у меня первый, далее второй
avatar

AM2

  • 24 декабря 2018, 21:59
0
сейчас наглядность появилась:




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

input int count=5;
input int kvart=4;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Kvart(int month)
  {
   int kv=0;
   if(month<4) kv=1; // 1 2 3
   if(month>3 && month<7) kv=2; // 4 5 6
   if(month>6 && month<10) kv=3; // 7 8 9
   if(month>9) kv=4; // 10 11 12
   return(kv);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Sum(int num)
  {
   int sum=0;
   for(int i=1;i<=3;i++)
     {
      double lo=iLow(NULL,PERIOD_MN1,i*num+Shift(Month()));//1*1+3
      double hi=iHigh(NULL,PERIOD_MN1,i*num+Shift(Month()));
      sum+=(int)((hi-lo)/_Point);
     }
   return(sum)/3;
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int MonthPoint(int num)
  {
   int point=0;
   double lo=iLow(NULL,PERIOD_MN1,num);
   double hi=iHigh(NULL,PERIOD_MN1,num);
   point=(int)((hi-lo)/_Point);
   return(point);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Shift(int month) // 1-rv = 1 2 3
  {
   int shift=0;

   if(Kvart(Month())==1 && Month()==1) shift=1;
   if(Kvart(Month())==1 && Month()==2) shift=2;
   if(Kvart(Month())==1 && Month()==3) shift=3;

   if(Kvart(Month())==2 && Month()==4) shift=1;
   if(Kvart(Month())==2 && Month()==5) shift=2;
   if(Kvart(Month())==2 && Month()==6) shift=3;

   if(Kvart(Month())==3 && Month()==7) shift=1;
   if(Kvart(Month())==3 && Month()==8) shift=2;
   if(Kvart(Month())==3 && Month()==8) shift=3;

   if(Kvart(Month())==4 && Month()==10) shift=1;
   if(Kvart(Month())==4 && Month()==11) shift=2;
   if(Kvart(Month())==4 && Month()==12) shift=3;

   return(shift);
  }
//+------------------------------------------------------------------+
//| Put Text Function                                                |
//+------------------------------------------------------------------+
void Text(string name,const string text,double price,datetime time,const color clr)
  {
   ObjectDelete(0,name);
//--- create a "Text" object 
   ObjectCreate(0,name,OBJ_TEXT,0,time,price);
//--- set the text
   ObjectSetString(0,name,OBJPROP_TEXT,text);
//--- set the font of the text
   ObjectSetString(0,name,OBJPROP_FONT,"Arial");
//--- set the font size
   ObjectSetInteger(0,name,OBJPROP_FONTSIZE,11);
//--- set the method binding
   ObjectSetInteger(0,name,OBJPROP_ANCHOR,ANCHOR_UPPER);
//--- set the color
   ObjectSetInteger(0,name,OBJPROP_COLOR,clr);
  }
//+------------------------------------------------------------------+
//| Вертикальная линия                                               |
//+------------------------------------------------------------------+
void PutVLine(string name,datetime t,color clr)
  {
   ObjectDelete(0,name);
   ObjectCreate(0,name,OBJ_VLINE,0,t,Bid);
//--- установим цвет линии
   ObjectSetInteger(0,name,OBJPROP_COLOR,clr);
//--- установим толщину линии
   ObjectSetInteger(0,name,OBJPROP_WIDTH,1);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
/*
1. Определим текущий квартал Kvart(int month)
2. Определим сумму за текущий квартал
3.
*/

   string s="";
   double lo=Low[iLowest(NULL,0,MODE_LOW,11,0)];

   for(int i=1;i<=count;i++)
     {
      s+="\n"+(string)i+" Kvart: "+(string)Sum(i);
      datetime tm1=iTime(NULL,PERIOD_MN1,Shift(Month())-3+i*3);
      Text(string(i),(string)Sum(i),lo,tm1,Red);      
     }

   for(int i=0;i<count;i++)
     {      
      datetime tm2=iTime(NULL,PERIOD_MN1,Shift(Month())+i*3-1);
      PutVLine((string)i+"v",tm2,Red);
     }

   Comment("\n Kvartal: ",Kvart(Month()),
           "\n Shift: ",(string)Shift(Month())+s);

//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+

avatar

AM2

  • 24 декабря 2018, 21:53
0
предупреждения дело поправимое. все еще в процессе
avatar

AM2

  • 23 декабря 2018, 22:00
0
по кварталам считает:




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

input int count=5;
input int kvart=4;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Kvart(int month)
  {
   int kv=0;
   if(month<4) kv=1; // 1 2 3
   if(month>3 && month<7) kv=2; // 4 5 6
   if(month>6 && month<10) kv=3; // 7 8 9
   if(month>9) kv=4; // 10 11 12
   return(kv);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Sum(int num)
  {
   int sum=0;
   for(int i=1;i<=3;i++)
     {
      double lo=iLow(NULL,PERIOD_MN1,i*num+Shift(Month()));//1*1+3
      double hi=iHigh(NULL,PERIOD_MN1,i*num+Shift(Month()));
      sum+=((hi-lo)/_Point);
     }
   return(sum)/3;
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int MonthPoint(int num)
  {
   int point=0;
   double lo=iLow(NULL,PERIOD_MN1,num);
   double hi=iHigh(NULL,PERIOD_MN1,num);
   point=(hi-lo)/_Point;
   return(point);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Shift(int month) // 1-rv = 1 2 3
  {
   int shift=0;

   if(Kvart(Month())==1 && Month()==1) shift=1;
   if(Kvart(Month())==1 && Month()==2) shift=2;
   if(Kvart(Month())==1 && Month()==3) shift=3;

   if(Kvart(Month())==2 && Month()==4) shift=1;
   if(Kvart(Month())==2 && Month()==5) shift=2;
   if(Kvart(Month())==2 && Month()==6) shift=3;

   if(Kvart(Month())==3 && Month()==7) shift=1;
   if(Kvart(Month())==3 && Month()==8) shift=2;
   if(Kvart(Month())==3 && Month()==8) shift=3;

   if(Kvart(Month())==4 && Month()==10) shift=1;
   if(Kvart(Month())==4 && Month()==11) shift=2;
   if(Kvart(Month())==4 && Month()==12) shift=3;

   return(shift);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
/*
1. Определим текущий квартал Kvart(int month)
2. Определим сумму за текущий квартал
3.
*/
   string s="";
   for(int i=1;i<=count;i++)
     {
      s+="\n"+(string)i+" Kvart: "+(string)Sum(i);
     }
   Comment("\n Kvartal: ",Kvart(Month()),
           "\n Shift: ",Shift(Month())+s);

//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+

avatar

AM2

  • 23 декабря 2018, 20:52
0
пока написал 2 функции.

1-я вычисляет квартал по текущему месяцу.
2-я определяет сдвиг относительно текущего месяца для последующих расчетов


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

input int count=2;
input int kvart=4;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Kvart(int month)
  {
   int kv=0;
   if(month<4) kv=1; // 1 2 3
   if(month>3 && month<7) kv=2; // 4 5 6
   if(month>6 && month<10) kv=3; // 7 8 9
   if(month>9) kv=4; // 10 11 12
   return(kv);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Shift(int month) // 1-rv = 1 2 3
  {
   int shift=0;

   if(Kvart(Month())==1 && Month()==1) shift=1;
   if(Kvart(Month())==1 && Month()==2) shift=2;
   if(Kvart(Month())==1 && Month()==3) shift=3;

   if(Kvart(Month())==2 && Month()==4) shift=1;
   if(Kvart(Month())==2 && Month()==5) shift=2;
   if(Kvart(Month())==2 && Month()==6) shift=3;

   if(Kvart(Month())==3 && Month()==7) shift=1;
   if(Kvart(Month())==3 && Month()==8) shift=2;
   if(Kvart(Month())==3 && Month()==8) shift=3;

   if(Kvart(Month())==4 && Month()==10) shift=1;
   if(Kvart(Month())==4 && Month()==11) shift=2;
   if(Kvart(Month())==4 && Month()==12) shift=3;

   return(shift);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
/*
1. Определим текущий квартал Kvart(int month)
2. Определим сумму за текущий квартал
3.
*/
   string s="";
   for(int i=0;i<count;i++)
     {
      double lo=iLow(NULL,PERIOD_MN1,i);
      double hi=iHigh(NULL,PERIOD_MN1,i);
      s+="\n"+(string)i+" Kvart: "+(string)NormalizeDouble((hi-lo)/_Point,2);
     }
   Comment("\n Kvartal: ",Kvart(Month()),
           "\n Shift: ",Shift(Month())+s);

//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+


avatar

AM2

  • 23 декабря 2018, 19:46
0
3 раза подвесил терминал. по моему достаточно :) 
avatar

AM2

  • 23 декабря 2018, 18:33
Начать торговлю с Альпари