ICustom function - page 19

 

OK its here. Compiler should complain during linking but it does not

 
fajst_k:
OK its here. Compiler should complain during linking but it does not

Those iCustom() calls are wrong (first 3 are simply reading in 3 consecutive values of macd, and the second 3 are - according to how old metatrader 4 was working - always equal to 0 - no need for dynamic zones macd indicator for that at all)

They should be called the same way how the dss calls are called in that code (with one call less - only macd, and upper and lower level need to be accessed)

 

Thanks for explanation, wanted to be sure. In this code "dss_dnlevel" seems also not to be used....

So for MACD shift 0,1,2 was used in iCustom but for dss just 1 and 2. Why this discrepancy ?? Should be check on current bar done for MACD ??

 
fajst_k:
Thanks for explanation, wanted to be sure. In this code "dss_dnlevel" seems also not to be used.... So for MACD shift 0,1,2 was used in iCustom but for dss just 1 and 2. Why this discrepancy ?? Should be check on current bar done for MACD ??

I think that those questions should be asked from the author of those conditions In my opinion it is always best to test closed bars only (shifts 1 and 2) in order to avoid false signals that one can get on current (still opened bar) but maybe mrtools can explain why did he use those values

 

Ok, forget it, will fix myself. But perhaps mr_tools should fix all this bugs and repost this EA.

 

iCustom Coding help

hello, I am trying to make an ea which is suppose to open trade based on an indicator alert.

Code of indicator that prompts alert is.....

PlaySound("alert.wav");

if (gi_112 == 1) MessageBox("Entry point: buy at " + l_price_20 + "!!", "Entry Point", 0);

else

if (gi_112 == 2) MessageBox("Entry point: sell at " + l_price_20 + "!!", "Entry Point", 0);

li_16 = FALSE;[/CODE]

and start function of EA is.....

[CODE]double gi_112 = iCustom(NULL,0,"TradeFx",0,0);

if (gi_112 == 1){

OrderSend(NULL,OP_BUY,Lots,Ask,3,Ask-SL*Point,Ask+TakeProfit*Point);

}

if (gi_112 == 2){

OrderSend(NULL,OP_SELL,Lots,Ask,3,Ask-SL*Point,Ask+TakeProfit*Point);

}

return(0);

right now no error is thrown while compiling. BUT just for cross checking whether code is right or wrong.

 

Need help for iCustom()

Hello traders,

I have Doda-Donchian indicator. I have some problem with this indicator when I used to backtest on Strategy Tester. I take Doda indicator to Chart while empty EA running on Strategy Tester. In Resistance Line 1, 2, 3 Pivot Level, Support Line 1,2,3, each one of them have their own value while tester is running. Tester running on 1st week, 2nd week and 3rd week. But Resistance Line, Pivot Line, Support Lines values didn't change during all date on Strategy Tester. I don't know why.

Can you tell me this problem?

When I pause Strategy Tester, I show Doda indicator properties. After click to OK button, indicators RL, Pivot Line, SLines change their own value. But why?

Next question is I used to iCustom("Doda-Donchian".,...,....) function, but problem is similar previous one.

 
sosa247:
Hello traders,

I have Doda-Donchian indicator. I have some problem with this indicator when I used to backtest on Strategy Tester. I take Doda indicator to Chart while empty EA running on Strategy Tester. In Resistance Line 1, 2, 3 Pivot Level, Support Line 1,2,3, each one of them have their own value while tester is running. Tester running on 1st week, 2nd week and 3rd week. But Resistance Line, Pivot Line, Support Lines values didn't change during all date on Strategy Tester. I don't know why.

Can you tell me this problem?

When I pause Strategy Tester, I show Doda indicator properties. After click to OK button, indicators RL, Pivot Line, SLines change their own value. But why?

Next question is I used to iCustom("Doda-Donchian".,...,....) function, but problem is similar previous one.

It is because some built in functions in new metatrader 4 back test are not working or are working wrong (especially time related functions)

 
sosa247:
Hello traders,

I have Doda-Donchian indicator. I have some problem with this indicator when I used to backtest on Strategy Tester. I take Doda indicator to Chart while empty EA running on Strategy Tester. In Resistance Line 1, 2, 3 Pivot Level, Support Line 1,2,3, each one of them have their own value while tester is running. Tester running on 1st week, 2nd week and 3rd week. But Resistance Line, Pivot Line, Support Lines values didn't change during all date on Strategy Tester. I don't know why.

Can you tell me this problem?

When I pause Strategy Tester, I show Doda indicator properties. After click to OK button, indicators RL, Pivot Line, SLines change their own value. But why?

Next question is I used to iCustom("Doda-Donchian".,...,....) function, but problem is similar previous one.

It is because some built in functions in new metatrader 4 back test are not working or are working wrong (especially time related functions). Nothing to change in the code. Only thing you can do is that metaquotes corrects errors in metatrader

 

Could some kind soul put me out of my misery & recdo the stuff below to allow the use of the 'Advanced_ADX' indicator. I know it requires the use of the 'icustom' function, but I have know idea how to do it.

//h1 data

double h1adm = iadm(NULL,PERIOD_H1,2,MODE_CLOSE);

//h4 data

double h4adx = iadx(NULL,PERIOD_H4,2,MODE_CLOSE);

//d1 data

double d1adx = iadx(NULL,PERIOD_D1,2,MODE_CLOSE);

//define color

color color_h1, color_h4, color_d1;

//define string

string arrow_h1, arrow_h4, arrow_d1;

//h1 up trend

if (h1adx < Bid ) { color_h1 = ColorUpGood; }

//h1 down trend

if (h1adx > Bid ) { color_h1 = ColorDownGood; }

//h4 up trend

if (h4adx < Bid ) { color_h4 = ColorUpGood; }

//h4 down trend

if (h4adx > Bid ) { color_h4 = ColorDownGood; }

//d1 up trend

if (d1adx < Bid ) { color_d1 = ColorUpGood; }

//d1 down trend

if (d1adx > Bid ) { color_d1 = ColorDownGood; }

Reason: