Commit 23e26013 authored by FXcoder's avatar FXcoder

new mql4

parent 326dfdbe
......@@ -13,10 +13,10 @@
#property indicator_color1 Blue
//---- input parameters
extern int ExtStdDevPeriod = 20;
extern int ExtStdDevMAMethod = 0;
extern int ExtStdDevAppliedPrice = 0;
extern int ExtStdDevShift = 0;
input int ExtStdDevPeriod = 20;
input int ExtStdDevMAMethod = 0;
input int ExtStdDevAppliedPrice = 0;
input int ExtStdDevShift = 0;
//---- buffers
double ExtStdDevBuffer[];
......@@ -24,7 +24,7 @@ double ExtStdDevBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
void OnInit()
{
string sShortName;
......@@ -44,15 +44,12 @@ int init()
//---- first values aren't drawn
SetIndexDrawBegin(0, ExtStdDevPeriod);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Standard Deviation |
//+------------------------------------------------------------------+
int start()
int OnCalculate(const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[])
{
int i, j, nCountedBars;
double dAPrice, dAmount, dMovingAverage;
......@@ -86,7 +83,7 @@ int start()
}
//----
return(0);
return(rates_total);
}
//+------------------------------------------------------------------+
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment