kajironpu:
I want to put Close[0] price value into buffer.
I coded.
But when I checked buffer1 , it is EMPTY_VALUE.
What am I missing?
You don't have a buffer 1.
You only have 1 buffer and that is buffer 0
Keith Watford:
You don't have a buffer 1.
You only have 1 buffer and that is buffer 0
Thank you , Keith
Is this correct?
#property strict #property indicator_buffers 1 double Buffer[]; int OnInit() { SetIndexBuffer(1,Buffer); } void OnTimer() { Buffer[1]=Close[0]; }
Keith Watford:
Sorry, I must have mis-read your post, I thought that you were trying to access Buffer 1, not Buffer[1].
How are you checking the value?
Keith, Thanks
Now I am clear and made success.
#property indicator_buffers 1
This is for Number of buffer.
If I use only one buffer, I made 1.
Now it is OK with me.
Thank you for your kind replay.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I want to put Close[0] price value into buffer.
I coded.
But when I checked buffer1 , it is EMPTY_VALUE.
What am I missing?