Coding help - page 179

 

Thank you very much! mladen

Now it has become clear!

This way I have not thought Thank you again!

 
mladen:
On your picture you are showing a 1 hour chart and daily indicator value

In the iCustom() call you are using current time frame. If you want to use daily time frame you must specify it in the iCustom call (otherwise the will never be the same)

Also, you are using an open bar call. If you plan to use multi time frame call from the EA then you should know that using an opened multi time frame bar in back-test will give invalid results (it will always "know the future") so you should not use an opened bar call if you plan to use multi time frame

Младен день добрый, ещё раз..

вот что у меня сейчас получилось..

дальше ни фантазии ни опыта не хватает,

сильно не судите и не ругайте... для меня это ещё тяжело.

надеюсь на вашу снисходительность и понимание.

datetime timeprev;

extern color Color_Buy = Blue;// цвет вертикальной линии при сигнале к покупке

extern color Color_Sell = Red;// цвет вертикальной линии при сигнале к продаже

int start() {

double aTrend[2] ;

int ticket, err;

if (timeprev == Time[0]) return (0);

timeprev = Time[0];

aTrend[0] =iCustom(NULL, PERIOD_D1, "DSS Bressert + ahtf_(FILTER)", 6, 0); // буфер номер 6

aTrend[0] =iCustom(NULL, PERIOD_D1, "DSS Bressert + ahtf_(FILTER)", 6, 1); // буфер номер 6

if (aTrend[0] > aTrend[1] && aTrend[0] !=Close[1]) //Signal_Buy

{

RefreshRates();

//=========================================

{

string name = StringConcatenate(" BUY ",Symbol()," ",TimeToStr(Time[0]));

ObjectCreate(name,OBJ_VLINE,0,Time[0],0);

ObjectSet(name,OBJPROP_COLOR,Color_Buy);//Color_Buy_line

}

//=========================================

err = GetLastError();

}

if (aTrend[0] < aTrend[1] && aTrend[0] !=Close[1])//Signal_Sell

{

RefreshRates();

//============================================

{

name = StringConcatenate(" SELL ",Symbol()," ",TimeToStr(Time[0]));

ObjectCreate(name,OBJ_VLINE,0,Time[0],0);

ObjectSet(name,OBJPROP_COLOR,Color_Sell);//Color_Sell_line

}

//=============================================

err = GetLastError();

}

return(0); }

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

Помогите взять сигналы с индикатора - с периодом( PERIOD_D1),

на рабочем графике (H1)

 

Good day everyone. I'm here for a request. I would love to have an alert when the trend whether up or down reaches 70%. It'll be nice too if there will be a indication ie. color on the candle where the + Trend + UP or DOWN hit 70%.

If an error appeared while compiling 'using of decompiled source code is prohibited' error, this will help: I used an older build of mt4 this FXDDmt4setup_Build220 uploaded by matfx and it compiled successfully with no errors. Sorry for the trouble.

 
shtopr:
Младен день добрый, ещё раз..

вот что у меня сейчас получилось..

дальше ни фантазии ни опыта не хватает,

сильно не судите и не ругайте... для меня это ещё тяжело.

надеюсь на вашу снисходительность и понимание.

datetime timeprev;

extern color Color_Buy = Blue;// цвет вертикальной линии при сигнале к покупке

extern color Color_Sell = Red;// цвет вертикальной линии при сигнале к продаже

int start() {

double aTrend[2] ;

int ticket, err;

if (timeprev == Time[0]) return (0);

timeprev = Time[0];

aTrend[0] =iCustom(NULL, PERIOD_D1, "DSS Bressert + ahtf_(FILTER)", 6, 0); // буфер номер 6

aTrend[0] =iCustom(NULL, PERIOD_D1, "DSS Bressert + ahtf_(FILTER)", 6, 1); // буфер номер 6

if (aTrend[0] > aTrend[1] && aTrend[0] !=Close[1]) //Signal_Buy

{

RefreshRates();

//=========================================

{

string name = StringConcatenate(" BUY ",Symbol()," ",TimeToStr(Time[0]));

ObjectCreate(name,OBJ_VLINE,0,Time[0],0);

ObjectSet(name,OBJPROP_COLOR,Color_Buy);//Color_Buy_line

}

//=========================================

err = GetLastError();

}

if (aTrend[0] < aTrend[1] && aTrend[0] !=Close[1])//Signal_Sell

{

RefreshRates();

//============================================

{

name = StringConcatenate(" SELL ",Symbol()," ",TimeToStr(Time[0]));

ObjectCreate(name,OBJ_VLINE,0,Time[0],0);

ObjectSet(name,OBJPROP_COLOR,Color_Sell);//Color_Sell_line

}

//=============================================

err = GetLastError();

}

return(0); }

//+-----------------------------------+[/PHP]

Помогите взять сигналы с индикатора - с периодом( PERIOD_D1),

на рабочем графике (H1)

shtopr

Change this :

aTrend[0] =iCustom(NULL, PERIOD_D1, "DSS Bressert + ahtf_(FILTER)", 6, 0); // буфер номер 6

aTrend[0] =iCustom(NULL, PERIOD_D1, "DSS Bressert + ahtf_(FILTER)", 6, 1); // буфер номер 6

to this :

[PHP]aTrend[0] =iCustom(NULL, PERIOD_D1, "DSS Bressert + ahtf_(FILTER)", 6, 0); // буфер номер 6

aTrend[1] =iCustom(NULL, PERIOD_D1, "DSS Bressert + ahtf_(FILTER)", 6, 1); // буфер номер 6

(second line should use atrend[1] not atrend[0] as the first line)

and try it then

 

Младен Спасибо болшое!!

 
strawmango:
Good day everyone. I'm here for a request. I would love to have an alert when the trend whether up or down reaches 70%. It'll be nice too if there will be a indication ie. color on the candle where the + Trend + UP or DOWN hit 70%.

If an error appeared while compiling 'using of decompiled source code is prohibited' error, this will help: I used an older build of mt4 this FXDDmt4setup_Build220 uploaded by matfx and it compiled successfully with no errors. Sorry for the trouble.

забирайте. код большой, пришлось повозиться.

 

доброго дня младен!

исправления помогли! Спасибо.

теперь уже гораздо лучше! но ещё есть ложные сигналы,

как от них избавиться? хотелось, что бы всё работало идеально.. ))

как сделать правильно??

Files:
84701_1.jpg  140 kb
 
shtopr:
доброго дня младен!

исправления помогли! Спасибо.

теперь уже гораздо лучше! но ещё есть ложные сигналы,

как от них избавиться? хотелось, что бы всё работало идеально.. ))

как сделать правильно??

Frankly I do not know what is happening

First one was that you used default parameters instead of the 2,9,5 (as on the indicator)

The second is the following. What I noticed that the values of the daily dss are changing from time to time even if they should not change at all. That means that in back testing they changed something how multi time frame indicators are called from an EA. What did they change I have no idea, but it seems that from now on multi time frame back testing will not work as before at all

Attaching the version I tested which will display you the value of DSS and you will see that from time to time it is changing the current values of DSS (even though it should not do so in back test - or they changed sometihing in order to make it work in multi time frame for current bar the same way as it works in runtime). So, it is either some new way how the back testing is working or yet another metatrader bug, I can not tell which one of the two is happening (since in the same time the indicator itself works as it should)

Files:
test_5.mq4  2 kb
 
shtopr:
доброго дня младен!

исправления помогли! Спасибо.

теперь уже гораздо лучше! но ещё есть ложные сигналы,

как от них избавиться? хотелось, что бы всё работало идеально.. ))

как сделать правильно??

shtopr,

Take a look at this post : https://www.mql5.com/en/forum/181280/page7

There you will find what is going on when you use multi time frame indicator in an EA and when you back test such an EA

 
kenwa:
Hi mladen, could you kindly help to convert these two to rsi version of it separately? I try but not know how to do it, i.e. rsi of kairi, rsi of cci? thanks a lot for help.

kenwa

This is rsi of cci

You will found out that it is very easy to do the same with "kairi" indicator

Files:
Reason: