kentaicm:
I am trying to write an indicator that plot the volume, its moving average and its standard deviation. When I compile it, there is no error. However, when I try to plot it onto the chart, there isn't anything. What's went wrong?
Thanks in advance.
Below is the code.
- replace #property indicator_separate_window with #property indicator_chart_window
- assign values to inputs, like
input int Volume_MA=10; input int SD=10;
or enter them manually on indicator start.
Marcin Madrzak:
Still not workable.
- replace #property indicator_separate_window with #property indicator_chart_window
- assign values to inputs, likeor enter them manually on indicator start.
kentaicm:
Still not workable.
In Mql4 you can't use iBands on a volume array like that, you need to use iBandsOnArray. See here for a code snippet: https://www.mql5.com/en/forum/309671#comment_11223077
Still not workable.
![How to apply an iMA to a handle? How to apply an iMA to a handle?](https://c.mql5.com/36/25/how-to-apply-an-ima-to-a-handle.jpg)
How to apply an iMA to a handle?
- 2019.04.04
- www.mql5.com
Hi all! I'm trying to build an indicator based in ADX and a MA attached to it. In MT5, when I use iMA I can apply it to a handle...
- kentaicm:
VolumeBuffer[i]=volume[i]; VMABuffer[i] = iBands(NULL,0,Volume_MA,SD,0,VolumeBuffer[i],0,i); VSD_TopBuffer[i]= iBands(NULL,0,Volume_MA,SD,0,VolumeBuffer[i],1,i); VSD_BotBuffer[i]= iBands(NULL,0,Volume_MA,SD,0,VolumeBuffer[i],2,i);
- volume has no set direction, you are using it as As Series. Either set the direction or use the predefined Volume[].To determine the indexing direction of time[], open[], high[], low[], close[], tick_volume[], volume[] and spread[], call ArrayGetAsSeries(). In order not to depend on default values, you should unconditionally call the ArraySetAsSeries() function for those arrays, which are expected to work with.
Event Handling Functions - Functions - Language Basics - MQL4 Reference - The sixth argument of iBands is applied price. What price are you selecting when VolumeBuffer[i] is above six? You need to use iBandsOnArray
- volume has no set direction, you are using it as As Series. Either set the direction or use the predefined Volume[].
- lippmaje: https://www.mql5.com/en/forum/309671#comment_11223077Please use the link button
See the difference? https://www.mql5.com/en/forum/309671#comment_11223077
Messages Editor
whroeder1:
- volume has no set direction, you are using it as As Series. Either set the direction or use the predefined Volume[].
- The sixth argument of iBands is applied price. What price are you selecting when VolumeBuffer[i] is above six? You need to use iBandsOnArray
- Please use the link button See the
difference? https://www.mql5.com/en/forum/309671#comment_11223077
Messages Editor
You guys are great helper!! Solved. Managed to get it. Thanks to all here.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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 am trying to write an indicator that plot the volume, its moving average and its standard deviation. When I compile it, there is no error. However, when I try to plot it onto the chart, there isn't anything. What's went wrong?
Thanks in advance.
Below is the code.