0


так я вам точно не сделаю.



а вот здесь если у вас есть хотя бы примерный алгоритм как строить линии, то еще можно попробовать
avatar

AM2

  • 4 октября 2021, 13:06
0
вот нашел код у себя:




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

#property indicator_buffers 2

extern int Num=300;
extern int Count=1111;

double up[];
double dn[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexStyle(0,DRAW_LINE,0,2,Red);
   SetIndexBuffer(0,up);

   SetIndexStyle(1,DRAW_LINE,0,2,Blue);
   SetIndexBuffer(1,dn);

   Comment("");
//---
   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=0; i<Count; i++)
     {
      up[i]=high[iHighest(NULL,0,MODE_HIGH,Num,i)];
      dn[i]=low[iLowest(NULL,0,MODE_LOW,Num,i)];
     }

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

avatar

AM2

  • 3 октября 2021, 20:05
0
я делал индикатор по хай лоу за указанный период
avatar

AM2

  • 3 октября 2021, 19:09
0
написал в тему свой вариант MTF MA: www.opentraders.ru/downloads/3142/



Расчет можно делать в самом эксперте:


 pr=iMA(_Symbol,tf,period,shift,method,PRICE_CLOSE,int(MathFloor(tf/_Period)));

avatar

AM2

  • 3 октября 2021, 08:36
0
www.opentraders.ru/downloads/3118/
verta делал. к нему вопрос
avatar

AM2

  • 1 октября 2021, 15:51
0
вечерком посмотрю
avatar

AM2

  • 1 октября 2021, 11:59
0
самый простой способ — увеличить проскальзывание
avatar

AM2

  • 30 сентября 2021, 20:41
0
с логикой индикатора к автору
avatar

AM2

  • 30 сентября 2021, 20:37
0
добавил настройки ТМА, реверс, фрактал, свечу: www.opentraders.ru/downloads/3137/

avatar

AM2

  • 30 сентября 2021, 19:54
0
если вы пользуетесь кнопками советника, то можно сразу выставить маркет ордер и лимитки, тогда не будет глюка на разных парах. сделать так?
avatar

AM2

  • 29 сентября 2021, 21:21
0
добавил 4 условия, ни одной сделки:


//+------------------------------------------------------------------+
//|                                                    Binarik13.mq4 |
//|                                              Copyright 2021, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, 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      = 0;          // лось
extern int TakeProfit    = 0;          // язь
extern int Slip          = 3;          // реквот
extern int Shift         = 1;          // бар индикатора
extern int Magic         = 123;        // магик

extern int RSI           = 14;         // период RSI
extern int RSILevel      = 30;         // уровень RSI
extern int BBPer         = 20;         // период лент
extern double BBDev      = 2;          // разбег лент

extern string IndName    = "+++Agimat BO Trigger";
extern bool Message      = 1;
extern int Length        = 6;

extern string IndName2   =  "TMA_Fair";

extern string Expiration = "15";       // истечение

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   Comment("");
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   Comment("");
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
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(),NormalizeDouble(price,Digits),Slip,sl,tp,Expiration,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 Loss()
  {
   int loss=0;
   for(int i=OrdersHistoryTotal()-1; i>=0; i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY))
        {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
           {
            if(OrderType()==0)
              {
               if(OrderClosePrice()-OrderOpenPrice()<0)
                  loss++;
               if(OrderClosePrice()-OrderOpenPrice()>0)
                  break;
              }
            if(OrderType()==1)
              {
               if(OrderClosePrice()-OrderOpenPrice()>0)
                  loss++;
               if(OrderClosePrice()-OrderOpenPrice()<0)
                  break;
              }
           }
        }
     }
   return(loss);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
double Lot()
  {
   double lot=NormalizeDouble(Lots*MathPow(KLot,Loss()),2);
   if(lot>MaxLot)
      lot=Lots;
   return(lot);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   double rsi=iRSI(NULL,0,RSI,0,Shift);
   double ma=iCustom(NULL,0,IndName2,0,Shift);
   
   double bup=iBands(NULL,0,BBPer,BBDev,0,0,1,Shift);
   double bdn=iBands(NULL,0,BBPer,BBDev,0,0,2,Shift);

   double up=iCustom(NULL,0,IndName,Message,Length,1,Shift);
   double dn=iCustom(NULL,0,IndName,Message,Length,2,Shift);

   bool buy=Bid>ma && rsi<RSILevel && Bid<bdn && up!=EMPTY_VALUE;
   bool sell=Bid<ma && rsi>100-RSILevel && Bid>bup && dn!=EMPTY_VALUE;

   if(CountTrades()<1)
     {
      if(buy)
        {
         PutOrder(0,Ask);
        }
      if(sell)
        {
         PutOrder(1,Bid);
        }
     }

   Comment("\n Lot: ",Lot(),
           "\n Up: ",up,
           "\n Dn: ",dn);
  }
//+------------------------------------------------------------------+



avatar

AM2

  • 29 сентября 2021, 21:05
0


посмотрю сегодня
avatar

AM2

  • 29 сентября 2021, 18:04