ICustom function - page 13

 

Email notification, Sound notification

I have a problem here. I set up my email function to receive notification and tested it via test button, all works as it should.

I also did the set up on one of my custom indicators to give an alert via Easy_iCustom_and_Alerts file, which it does (the alert window pops up and gives off the sound)

However, it does not push the alert generated by this file to my email notification functions. Again I tested my email via test button and it works as it should. What else I need to do to push the actual alert generated by Icustom file on one of my indicators to my email. Any help is greatly appreciated.

Thank you.

 

using icustom together with itime possible?

i am trying to make a simple EA that crosses the line to do a buy and close the buy buy when line crosses again and start a sell.

the indicator i am using is called Imax which i have attached here. it is very simple indicator and probaly not much profitable. however i want to learn. so i use this very simple indicator.

so how could i fix the EA , so it will do sell or buy or closing order when it crosses a line?

and not cross the line then wait until bar is finnished and then start a sell or buy or close order?

should i use itime?

thanks in advance

Files:
imax.mq4  4 kb
 

Hi,

I'm implmenting my personal EA. I'm using iCustom function for loading external indicator.

NOw my call is right because the right value is returnet, but I don't understand because every time I call iCustom in the Journal appears message "INdicator successfull loading".

I call iCustom function every time, because it's in start block, so in Journal I have a long list of messagges.

Is it normal?

 

how to put custom indicator to ea?

hello every one..

i have this indicator, but don't know to input it to ea..

this is my indicator code:

extern int period = 15;

extern int method = 1;

extern int price = 0;

double g_ibuf_88[];

double g_ibuf_92[];

double g_ibuf_96[];

int init() {

IndicatorBuffers(3);

SetIndexBuffer(0, g_ibuf_88);

SetIndexBuffer(1, g_ibuf_92);

SetIndexBuffer(2, g_ibuf_96);

ArraySetAsSeries(g_ibuf_96, TRUE);

SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);

SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 2);

IndicatorShortName("Slope Direction Line(" + period + ")");

return (0);

}

int deinit() {

return (0);

}

double WMA(int ai_0, int a_period_4) {

return (iMA(NULL, 0, a_period_4, 0, method, price, ai_0));

}

int start() {

double lda_16[];

double lda_20[];

int l_ind_counted_0 = IndicatorCounted();

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

int li_4 = 0;

int l_period_8 = MathSqrt(period);

int li_12 = Bars - l_ind_counted_0 + period + 1;

if (li_12 > Bars) li_12 = Bars;

ArrayResize(lda_16, li_12);

ArraySetAsSeries(lda_16, TRUE);

ArrayResize(lda_20, li_12);

ArraySetAsSeries(lda_20, TRUE);

for (li_4 = 0; li_4 < li_12; li_4++) lda_16[li_4] = 2.0 * WMA(li_4, period / 2) - WMA(li_4, period);

for (li_4 = 0; li_4 < li_12 - period; li_4++) g_ibuf_96[li_4] = iMAOnArray(lda_16, 0, l_period_8, 0, method, li_4);

for (li_4 = li_12 - period; li_4 >= 0; li_4--) {

lda_20[li_4] = lda_20[li_4 + 1];

if (g_ibuf_96[li_4] > g_ibuf_96[li_4 + 1]) lda_20[li_4] = 1;

if (g_ibuf_96[li_4] < g_ibuf_96[li_4 + 1]) lda_20[li_4] = -1;

if (lda_20[li_4] > 0.0) {

g_ibuf_88[li_4] = g_ibuf_96[li_4];

if (lda_20[li_4 + 1] < 0.0) g_ibuf_88[li_4 + 1] = g_ibuf_96[li_4 + 1];

g_ibuf_92[li_4] = EMPTY_VALUE;

} else {

if (lda_20[li_4] < 0.0) {

g_ibuf_92[li_4] = g_ibuf_96[li_4];

if (lda_20[li_4 + 1] > 0.0) g_ibuf_92[li_4 + 1] = g_ibuf_96[li_4 + 1];

g_ibuf_88[li_4] = EMPTY_VALUE;

}

}

}

return (0);

}

what about in the ea?

thx..

 

Use iCustom() (more info about iCustom here : iCustom - MQL4 Documentation )

btw: what you posted is a decompiled and modified Hull moving average (Hull moving average uses method 3 (LWMA) and not method 1 (EMA) as in your code). Use some regular indicator (a lot of good Hull moving averages around) because the one you posted, apart from being decompiled, is repainting too

 

New Indicator- how to create?

Can somebody explain how to create new indicator based on 2 other indicators? I think that it will be interesting for many traders. Please is somebody know (and want) to give a example here.

thanks

 

Call a custom Indicator

I hope someone can help me. I want to call a custom indicator (the one who is attached to this topic). What I ultimately want to do is to generate a signal when i.e. buffer 2 is crossing buffer 4.

I am now trying to figure out if I can call this custom indicator or that I have to implement the indicator in my EA.

When I would use a stochastic it would be something like:

STOvalue1 = iStochastic(Symbol(),0,5,3,3,MODE_SMA,1,MODE_MAIN,0);

STOvalue2 = iStochastic(Symbol(),0,5,3,3,MODE_SMA,1,MODE_SIGNAL,0);

In my case it will probably be something like:

STOvalue1 = MB_Stochastic_005(???)

where ??? is the part I don't know. I hope anyone can help me. Thanks in advance.

Files:
 

iCustom

Marcel1966:
I hope someone can help me. I want to call a custom indicator (the one who is attached to this topic). What I ultimately want to do is to generate a signal when i.e. buffer 2 is crossing buffer 4.

I am now trying to figure out if I can call this custom indicator or that I have to implement the indicator in my EA.

When I would use a stochastic it would be something like:

STOvalue1 = iStochastic(Symbol(),0,5,3,3,MODE_SMA,1,MODE_MAIN,0);

STOvalue2 = iStochastic(Symbol(),0,5,3,3,MODE_SMA,1,MODE_SIGNAL,0);

In my case it will probably be something like:

STOvalue1 = MB_Stochastic_005(???)

where ??? is the part I don't know. I hope anyone can help me. Thanks in advance.

I think you want to use

iCustom( string symbol, int timeframe, string name, ..., int mode, int shift)

Just put "iCustom" into the search area on metaeditor, should explain everything.

All the best.

 
 
Reason: