Forum

Zero Divided Message

Hello, I have created a function to calculate the price´s changing rate. double Delta( const double &buffer1[], const double &buffer2[], int N, int index ) { double var = 0.0 ; var = ((buffer1[index]-buffer1[index-N])/buffer2[index-N]) ; return 100 * var ; } but depending on the the buffer that I

Function to Calculate the Average value of N close prices

Hello everyone, I have a simple problem (not for a beginner like me. LOL). I want to create a function that calculate the average of any of the OHLC values for a N period, and be called within the "OnCalculate" function . The Function i programmed is the follow : void Average( const double

Separate Windows Techinical Indicator Scale

Hello, I searched the forum for a similar issue but unfortunately did not find it. I am creating a very simple indicator, it just reads the volume and plots in a separate window. Despite this simplicity the chart is out of scale and the values ​​on Windows Data are totally wrong and random. Does