You are using SetIndexBuffer all wrong, search for examples.
buffers can't be declared with a size
buffers must be doubles only
why would you have current time as a buffer?!
How do you have 100 posts and still not know this?
Read more before you start coding. Make sure you know better what you are doing and what you are using. Stop posting annoying questions.
Just sit down.. and study. Properly. Don't ask every detail so that 5 people waste their time on something you should already have discovered yourself.
I'm sorry to be so harsh but I know what many Chinese people are like.. give an inch and they take a mile 得寸进尺 .. so that's it. No more inches from me.
The code is very simple, but I can't understand why MT4's expert complain that "array to be set is of incompatible type"
My codes are as below:
Another question is that: if I change the first line of the codes to be "indicator_chart_window" from "indicator_separate_window"; if the codes are executed normally, and attached to some pair, whether the bars will become very small because of this Indicator's buffer array---current_tiime[] has big value?
What alladir said bears repeating . . .
Please read the documentation before asking questions . . . the fastest way to get help is to help yourself first.
SetIndexBuffer() the array specified when you use SetIndexBuffer() is type double . . . bool SetIndexBuffer(int index, double array[])
hha,
Thanks, RaptorUK.
hha,
Thanks, RaptorUK.
hha,
Thanks, RaptorUK.
hha,
Thanks, RaptorUK.
Haha, ok, if you have a sense of humour all is forgiven
You are using SetIndexBuffer all wrong, search for examples.
buffers can't be declared with a size buffers can be declared with a size, in the fact and I have try to do that, it is well; I use iCustom() to get this value which is contained in the Indicator in Start(); If can't, how we can get the value which we want to use ?
buffers must be doubles only
why would you have current time as a buffer?!
How do you have 100 posts and still not know this?
Read more before you start coding. Make sure you know better what you are doing and what you are using. Stop posting annoying questions.
Just sit down.. and study. Properly. Don't ask every detail so that 5 people waste their time on something you should already have discovered yourself.
I'm sorry to be so harsh but I know what many Chinese people are like.. give an inch and they take a mile 得寸进尺 .. so that's it. No more inches from me.
buffers can be declared with a size, in the fact and I have try to do that, it is well; I use iCustom() to get this value which is contained in the Indicator in Start(); If can't, how we can get the value which we want to use ?
Buffers are single dimension arrays[] of the double type. They are set as buffers using SetIndexBuffer(). They are automatically sized and indexed so it is pointless trying to size them yourself. Whatever size you give them will be overruled when you call SetIndexBuffer(). There are thousands of indicators in the codebase to see as examples.
bool SetIndexBuffer( | int index, double array[]) |
index | - | Line index. Must lie between 0 and 7. |
array[] | - | Array that stores calculated indicator values. |
double ExtBufferSilver[];
int init()
{
SetIndexBuffer(0, ExtBufferSilver); // first line buffer
// ...
}
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The code is very simple, but I can't understand why MT4's expert complain that "array to be set is of incompatible type"
My codes are as below:
Another question is that: if I change the first line of the codes to be "indicator_chart_window" from "indicator_separate_window"; if the codes are executed normally, and attached to some pair, whether the bars will become very small because of this Indicator's buffer array---current_tiime[] has big value?