Page 1 of 1

Point of Balance iCustom

Posted: Wed Mar 29, 2017 6:58 am
by yuhu
Hi all, i am trying to use icustom with this attached indicator. I usually just delete the "extern" and it would work fine.

but not this time. Anyone can shed some like why this is so?Can someone help please make a non-input and possibly, have another buffer that have both positive and negative values, please?Many thanks in advance,
YFX

Re: Point of Balance iCustom

Posted: Wed Mar 29, 2017 7:34 am
by mladen
yuhu wrote:Hi all, i am trying to use icustom with this attached indicator. I usually just delete the "extern" and it would work fine.

but not this time. Anyone can shed some like why this is so?Can someone help please make a non-input and possibly, have another buffer that have both positive and negative values, please?Many thanks in advance,
YFX
Because it calls itself recursively to calculate the the value
If you remove the parameters, it can not do that any more

Re: Point of Balance iCustom

Posted: Wed Mar 29, 2017 8:08 am
by yuhu
I understand that. but just deleting the "extern" doesnt remove the parameters does it? Just internalizing it (?)

Re: Point of Balance iCustom

Posted: Wed Mar 29, 2017 8:16 am
by mladen
yuhu wrote:I understand that. but just deleting the "extern" doesnt remove the parameters does it? Just internalizing it (?)
No. First of all it makes them inaccessible and you can not set (change) their values any more
And since the indicator needs to have the parameters accessible (in order to "tell" to the next instance which level should be calculated) and since it can not do that ("tell") any more, the whole recursive mode falls and the calculations are nt being performed as they should

Re: Point of Balance iCustom

Posted: Wed Mar 29, 2017 11:28 pm
by yuhu
I see.

Would the following work:

(iCustom(NULL,0,"Point of balance - histo mtf nmc",0,12,10,PRICE_CLOSE,true,0,i+1))

Thank you in advance!

Re: Point of Balance iCustom

Posted: Wed Mar 29, 2017 11:49 pm
by yuhu
hmm, i tried the following:

(iCustom(NULL,0,"Point of balance - histo mtf nmc","Current time frame",12,10,1,true,0,i+1));
(iCustom(NULL,0,"Point of balance - histo mtf nmc",0,12,10,PRICE_CLOSE,true,0,i+1));
(iCustom(NULL,0,"Point of balance - histo mtf nmc","Current time frame",12,10,PRICE_CLOSE,true,0,i+1));

but it doesnt work.. do you see anything glaringly obvious that is wrong?

Thank you!

Re: Point of Balance iCustom

Posted: Thu Mar 30, 2017 2:05 am
by mladen
yuhu wrote:hmm, i tried the following:

(iCustom(NULL,0,"Point of balance - histo mtf nmc","Current time frame",12,10,1,true,0,i+1));
(iCustom(NULL,0,"Point of balance - histo mtf nmc",0,12,10,PRICE_CLOSE,true,0,i+1));
(iCustom(NULL,0,"Point of balance - histo mtf nmc","Current time frame",12,10,PRICE_CLOSE,true,0,i+1));

but it doesnt work.. do you see anything glaringly obvious that is wrong?

Thank you!
yuhu

You can not change the parameters of that indicator - they are used in a specific way that does not allow you to change them

Re: Point of Balance iCustom

Posted: Thu Mar 30, 2017 2:26 am
by yuhu
Hi Mladen, i wasnt trying to change anything, just wasnt sure of the correct syntax.

I finally managed to get it to work by 
iCustom(NULL,0,"Point of balance - histo mtf nmc","Current time frame",12,10,PRICE_CLOSE,true,1,i+1));

I still wasnt sure why buffer 0 didnt work, but buffer 1 works.

Many thanks as always for your guidance   :)

Re: Point of Balance iCustom

Posted: Thu Mar 30, 2017 8:23 pm
by mladen
yuhu wrote:Hi Mladen, i wasnt trying to change anything, just wasnt sure of the correct syntax.

I finally managed to get it to work by 
iCustom(NULL,0,"Point of balance - histo mtf nmc","Current time frame",12,10,PRICE_CLOSE,true,1,i+1));

I still wasnt sure why buffer 0 didnt work, but buffer 1 works.

Many thanks as always for your guidance  
Happy trading :)