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

AM2

  • 7 января 2022, 17:28
0
этот советник живёт своей жизнью
есть сигнал от индикатора торгует, нет молчит. в чем своя жизнь?
avatar

AM2

  • 7 января 2022, 11:07
0
там сгладить данные нужно было: www.opentraders.ru/downloads/3211/

avatar

AM2

  • 3 января 2022, 21:08
0
вот такой примерно получился вариант: www.opentraders.ru/downloads/3211/



avatar

AM2

  • 3 января 2022, 18:04
0
часть сделал. то что не сделал, покажите на скрине с пояснениями.




//+------------------------------------------------------------------+
//|                                                    BuySell47.mq4 |
//|                                              Copyright 2020, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, 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 int StopLoss      = 500;      // лось
extern int TakeProfit    = 900;      // язь
extern int BULevel       = 200;      // уровень БУ
extern int BUPoint       = 30;       // пункты БУ
extern double Up         = 1.185;    // верхняя граница канала
extern double Dn         = 1.18;     // нижняя граница канала
extern int Slip          = 30;       // реквот
extern int Magic         = 123;      // магик

//+------------------------------------------------------------------+
//| 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;

   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(type),NormalizeDouble(price,_Digits),Slip,sl,tp,"",Magic,0,clr);
   return;
  }
//+------------------------------------------------------------------+
//| Лот для гридера                                                  |
//+------------------------------------------------------------------+
double Lot(int type)
  {
   double lot=Lots;

   if(CountTrades()>0)
      lot=NormalizeDouble(Lots*MathPow(KLot,CountOrders(type)),2);

   if(lot>MaxLot)
      lot=Lots;
      
   return(lot);
  }
//+------------------------------------------------------------------+
//|  Безубыток ордеров   if(BULevel>0) BU();                         |
//+------------------------------------------------------------------+
void BU()
  {
   bool m=1;

   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)
              {
               if(OrderOpenPrice()<=(Bid-(BULevel+BUPoint)*_Point) && OrderOpenPrice()>OrderStopLoss())
                 {
                  m=OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+BUPoint*_Point,OrderTakeProfit(),0,Yellow);
                  return;
                 }
              }

            if(OrderType()==OP_SELL)
              {
               if(OrderOpenPrice()>=(Ask+(BULevel+BUPoint)*_Point) && (OrderOpenPrice()<OrderStopLoss() || OrderStopLoss()==0))
                 {
                  m=OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-BUPoint*_Point,OrderTakeProfit(),0,Yellow);
                  return;
                 }
              }
           }
        }
     }
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int CountTrades(int type=-1)
  {
   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 || type==-1)
               count++;
           }
        }
     }
   return(count);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void CloseAll(int ot=-1)
  {
   bool cl;
   for(int i=OrdersTotal()-1; i>=0; i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
           {
            if(OrderProfit()>0)
              {
               if(OrderType()==0 && (ot==0 || ot==-1))
                 {
                  RefreshRates();
                  cl=OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Bid,_Digits),Slip,White);
                 }
               if(OrderType()==1 && (ot==1 || ot==-1))
                 {
                  RefreshRates();
                  cl=OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Ask,_Digits),Slip,White);
                 }
              }
           }
        }
     }
  }
//+------------------------------------------------------------------+
//| Профит всех ордеров по типу ордера                               |
//+------------------------------------------------------------------+
double AllProfit(int ot=-1)
  {
   double pr=0;

   for(int i=OrdersTotal()-1; i>=0; i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderType()==0 && (ot==0 || ot==-1))
           {
            pr+=OrderProfit()+OrderCommission()+OrderSwap();
           }

         if(OrderType()==1 && (ot==1 || ot==-1))
           {
            pr+=OrderProfit()+OrderCommission()+OrderSwap();
           }
        }
     }
   return(pr);
  }
//+------------------------------------------------------------------+
//| Подсчет ордеров по типу                                          |
//+------------------------------------------------------------------+
int CountOrders(int type=-1)
  {
   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 || type==-1)
               count++;
           }
        }
     }
   return(count);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   if(BULevel>0)
      BU();

   if(CountOrders()<1 && Bid<Up && Bid>Dn)
     {
      if(CountOrders(4)<1)
        {
         PutOrder(4,Up);
        }

      if(CountOrders(5)<1)
        {
         PutOrder(5,Dn);
        }
     }

   if(CountTrades()>1)
     {
      if(Bid<Dn && CountOrders(4)<1)
        {
         PutOrder(4,Up);
        }

      if(Bid>Up && CountOrders(5)<1)
        {
         PutOrder(5,Dn);
        }
     }

   Comment("\n Profit: ",AllProfit());
  }
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+

//+------------------------------------------------------------------+

avatar

AM2

  • 3 января 2022, 09:05
0
я на мкл такой видел. там таблица в строках индикатор ма рси и т.д. в столбцах тф.
avatar

AM2

  • 2 января 2022, 19:46
0
тз рассмотрю
avatar

AM2

  • 2 января 2022, 17:12
0
нужно подробно описать весь круг. здесь открыли, тут увеличили и т.д. все со скринами
avatar

AM2

  • 2 января 2022, 16:45
0
весьма приблизительно набросал для мт4 подобный код:



нужен исходник или метод расчета линий


//+------------------------------------------------------------------+
//|                                                       TwoWPR.mq4 |
//|                                              Copyright 2022, AM2 |
//|                                     https://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, AM2"
#property link      "https://www.forexsystems.biz"
#property version   "1.00"
#property strict
#property indicator_separate_window

#property indicator_buffers 2

extern int WPR = 120;
extern int Count = 5;


double wpr1[];
double wpr2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexStyle(0,DRAW_LINE,0,2,Aqua);
   SetIndexStyle(1,DRAW_LINE,0,2,Red);
   SetIndexBuffer(0,wpr1);
   SetIndexBuffer(1,wpr2);
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| 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[])
  {
//---
   for(int i = 111; i>=0; i--)
     {
      wpr1[i] = (iWPR(Symbol(),Period(),WPR,i)+50.0)*2;
      wpr2[i] = 100-(iWPR(Symbol(),Period(),WPR*Count,i)+100.0)*2;
     }
     
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+

avatar

AM2

  • 2 января 2022, 10:46
0
возможно расчет машки идет по другому wpr.

это не кодируется
avatar

AM2

  • 2 января 2022, 06:35
0
готово:


//+------------------------------------------------------------------+
//|                                                 VulkanProfit.mq4 |
//|                                              Copyright 2021, AM2 |
//|                                     https://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, AM2"
#property link      "https://www.forexsystems.biz"
#property version   "1.00"
#property strict
#property indicator_separate_window

#property indicator_buffers 2

input int VP_WMA=3;
input int Slower_WMA=8;
input int FasterSidusEMA=18;
input int SlowerSidusEMA=28;

input int VP_Bars=1000;

input bool Push=1;

input string IndName="Vulkan Profit";

double up[];
double dn[];

datetime t=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping

   SetIndexBuffer(0,up);
   SetIndexArrow(0,233);
   SetIndexStyle(0,DRAW_ARROW,0,2,Aqua);

   SetIndexBuffer(1,dn);
   SetIndexArrow(1,234);
   SetIndexStyle(1,DRAW_ARROW,0,2,Tomato);

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| 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[])
  {
//---
   if(t!=time[0])
     {
      for(int i=0; i<VP_Bars; i++)
        {
         double buy=iCustom(NULL,0,IndName,VP_WMA,Slower_WMA,FasterSidusEMA,SlowerSidusEMA,0,i);
         double sell=iCustom(NULL,0,IndName,VP_WMA,Slower_WMA,FasterSidusEMA,SlowerSidusEMA,1,i);

         if(buy!=EMPTY_VALUE)
           {
            up[i]=low[i];
            if(Push)
               SendNotification(_Symbol+" Buy!");
           }

         if(sell!=EMPTY_VALUE)
           {
            dn[i]=high[i];
            if(Push)
               SendNotification(_Symbol+" Sell!");
           }
        }
      t=time[0];
     }

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

avatar

AM2

  • 31 декабря 2021, 02:27
0
я могу что то посмотреть если у меня так же, но у меня все нормально
avatar

AM2

  • 29 декабря 2021, 21:52
0
и т.д.

avatar

AM2

  • 29 декабря 2021, 21:07
0
поставил время 2 минуты, через свечку открыл следующую пару:

avatar

AM2

  • 29 декабря 2021, 21:06