Нужна небольшая помощь профи!!!!!!!!!!!!!

 

Хочу вставить индикатор в советник, шаблон которого находится по этой ссылке https://www.mql5.com/ru/code/9835. Здесь нужно просто вставить параметры индюка и когда покупать и продавать

Так вот, друг дал код такого индюка, говорит что хороший, потому что показывает стрелки когда торговать. Так может кто знает что надо ввести в советник, чтобы он открывал позиции на покупку когда стрелочка вверх и наоборот!!!!!!?????? Помогите нубу в програмировании.)

Вот код:

int init()
{
//---- indicators
SetIndexStyle(0, DRAW_ARROW, EMPTY,QQE_Width);
SetIndexArrow(0, 241);
SetIndexBuffer(0, CrossUp);
SetIndexStyle(1, DRAW_ARROW, EMPTY,QQE_Width);
SetIndexArrow(1, 242);
SetIndexBuffer(1, CrossDown);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit, i, counter;
//double fasterEMAnow, slowerEMAnow, fasterEMAprevious, slowerEMAprevious, fasterEMAafter, slowerEMAafter;
double fasterRSInow,slowerRSInow,fasterRSIprevious,slowerRSIprevious,fasterRSIafter,slowerRSIafter;
double Range, AvgRange;

int counted_bars=IndicatorCounted();
//---- check for possible errors

if(counted_bars<0) return(-1);

//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;

limit=Bars-counted_bars;

for(i = 0; i <= limit; i++)
{

counter=i;
Range=0;
AvgRange=0;
for (counter=i ;counter<=i+9;counter++)
{
AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);
}
Range=AvgRange/10;

fasterRSInow = iCustom(NULL,0,"QQEA",QQE_SF,QQE_RSI_Period,QQE_DARFACTOR,0,i);
fasterRSIprevious = iCustom(NULL,0,"QQEA",QQE_SF,QQE_RSI_Period,QQE_DARFACTOR,0,i+1);
fasterRSIafter = iCustom(NULL,0,"QQEA",QQE_SF,QQE_RSI_Period,QQE_DARFACTOR,0,i-1);

slowerRSInow = iCustom(NULL,0,"QQEA",QQE_SF,QQE_RSI_Period,QQE_DARFACTOR,1,i);
slowerRSIprevious = iCustom(NULL,0,"QQEA",QQE_SF,QQE_RSI_Period,QQE_DARFACTOR,1,i+1);
slowerRSIafter = iCustom(NULL,0,"QQEA",QQE_SF,QQE_RSI_Period,QQE_DARFACTOR,1,i-1);


if ((fasterRSInow > slowerRSInow) && (fasterRSIprevious < slowerRSIprevious) && (fasterRSIafter > slowerRSIafter))
{
CrossUp[i] = Low[i] - Range*QQE_Position;
}
else
if ((fasterRSInow < slowerRSInow) && (fasterRSIprevious > slowerRSIprevious) && (fasterRSIafter < slowerRSIafter))
{
CrossDown[i] = High[i] + Range*QQE_Position;
}
/* if (SoundON==true && i==1 && CrossUp[i] > CrossDown[i] && alertTag!=Time[0])
{
Alert("EMA Cross Trend going Down on ",Symbol()," ",Period());
alertTag = Time[0];
}
if (SoundON==true && i==1 && CrossUp[i] < CrossDown[i] && alertTag!=Time[0])
{
Alert("EMA Cross Trend going Up on ",Symbol()," ",Period());
alertTag = Time[0];
} */

// Gestione Alert visivo //
if (EnableVisualAlert==true && i==1 && CrossUp[i] > CrossDown[i] && alertTag!=Time[0])
{
Alert("QQE Cross Trend going DOWN on ",Symbol()," ",Periodo(Period()));
alertTag = Time[0];
}
if (EnableVisualAlert==true && i==1 && CrossUp[i] < CrossDown[i] && alertTag!=Time[0])
{
Alert("QQE Cross Trend going UP on ",Symbol()," ",Periodo(Period()));
alertTag = Time[0];
}

// Gestione Alert sonoro //
if (EnableSoundAlert==true && i==1 && CrossUp[i] > CrossDown[i] && soundTag!=Time[0])
{
PlaySound ("short.wav");
soundTag = Time[0];
}
if (EnableSoundAlert==true && i==1 && CrossUp[i] < CrossDown[i] && soundTag!=Time[0])
{
PlaySound ("long.wav");
soundTag = Time[0];
}

// Gestione Alert con email //
if (EnableEmailAlert==true && i==1 && CrossUp[i] > CrossDown[i] && emailTag!=Time[0])
{
SendMail("Supernova alert signal!","QQE Cross Trend going DONWN on " + (StringConcatenate(Symbol()," ",Periodo(Period()))));
emailTag = Time[0];
}
if (EnableEmailAlert==true && i==1 && CrossUp[i] < CrossDown[i] && emailTag!=Time[0])
{
SendMail("Supernova alert signal!","QQE Cross Trend going UP on " + (StringConcatenate(Symbol()," ",Periodo(Period()))));
emailTag = Time[0];
}
}
return(0);
}

string Periodo(int TF)
{
if (TF==1) { return("M1"); }
if (TF==5) { return("M5"); }
if (TF==15) { return("M15"); }
if (TF==30) { return("M30"); }
if (TF==60) { return("H1"); }
if (TF==240) { return("H4"); }
if (TF==1440) { return("D1"); }
}

 
пользуйтесь iCustom
 
sergeev:

пользуйтесь iCustom


Эх, я полный нуб, хоть и читал про iCustom но не знаю куда его вписывать. Помогите профи, уже 3 дня ничего не получается.
 
synex:


Эх, я полный нуб, хоть и читал про iCustom но не знаю куда его вписывать. Помогите профи, уже 3 дня ничего не получается.

а где советник, в который нужно вставить индикатор?
 
abolk:

а где советник, в который нужно вставить индикатор?


Вот. Помоги эсли не трудно. Заранее спасибо!
 
Хоть и не профи, но имею сказать ))) По этой ссылке https://www.mql5.com/ru/code/9235 можно скачать советник Integera exp_iCustom_v7_2.mq4, там же есть полное описание работы и комментарии. Там нужно перейти к самой первой версии, где есть инструкция в картинках. А попросту, во входных параметрах советника во вкладке iCustomName введите имя индикатора (без расширения), укажите ТП и СЛ и советник может торговать.
 
Кстати, если нужен индикатор рисующий стрелочки, то на мой взляд есть еще один интересный индикатор LabTrend1_v4. Он рисует точки на покупку/продажу.