icustom output? - page 2

 

Thank you onewithZ. for the Ctrl+D, and dabbler for answering the question with a simple answer(instead of redirecting me) when noone else would!

And @deVries your question that you asked me I mistook for theoretical mocking(as in it's impossible to do what I asked using iCustom() ) not an actual question of how to do it.

tbh after you quoted me using the 4 var=icust. you'd think I understood it enough to not have to ask again, but to humor you:

VariableRed=iCustom("GBUSD",60,"ATRChannel",true,false,14,0,9);
//Can't set the specific bar because the shift is done relatively, but I set it to 8 bars previous.
 
If you think " iCustom allows you to access your Indicators buffers . . . it's that simple. " isn't a simple and correct answer then you need to do a little more reading of the book.
 

It looks clear to you the right buffer and bar 8 you have to know that the bar number on the chart is also from

right to left beginning with 0 then counting up +1 each next bar

so it is number 9 on the chart what number 8 is in the formula...

VariableRed=iCustom("GBPUSD",60,"ATRChannel",true,false,14,0,8);

iCustom works only if there is an ex4 file of the indicator and can have maximal 8 buffers to read

Good luck using it....

 
RaptorUK:
If you think " iCustom allows you to access your Indicators buffers . . . it's that simple." isn't a simple and correct answer then you need to do a little more reading of the book.


I was unfamiliar with a buffer's relation to a line on a graph, hence my misgivings, but as I said thanks for the links. I did read through them and I did learn or confirm a few things through them.

I have read none of this book, though I might take a look after I do some more tests. I tend to learn better through trying to write my own scripts and getting help with certain functions I need along the way.

iCustom works only if there is an ex4 file of the indicator and can have maximal 8 buffers to read

If there isn't I can always recompile one and delete unessential(for what I need) buffers.

Also deVries your right I miscounted that.

 
ricloud:


I was unfamiliar with a buffer's relation to a line on a graph, hence my misgivings, but as I said thanks for the links. I did read through them and I did learn or confirm a few things through them.

I have read none of this book, though I might take a look after I do some more tests. I tend to learn better through trying to write my own scripts and getting help with certain functions I need along the way.

There are some quite good sections in the book, I've not read it all, I have just used it as a reference. The section on Indicators might well give you some background that would help: https://book.mql4.com/samples/icustom
 

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


symbol - Symbol the data of which should be used to calculate indicator. NULL means current symbol.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
name - Custom indicator compiled program name.
... - Parameters set (if necessary). The passed parameters and their order must correspond with the desclaration order and the type of extern variables of the custom indicator.
mode - Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).