hie mal der Mql4code
3.jpg
Code:
//
#property copyright ""
#property link ""
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_minimum -200
#property indicator_maximum 200
#property indicator_color1 Black
extern int barsToProcess=100;
double ExtMapBuffer1[];
int init()
{
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
MathSrand(TimeLocal());
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
ObjectsDeleteAll();
// Löschen wir alle Objekte
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
MathSrand(GetTickCount());
double RSIWert = iRSI(Symbol(),0,14,PRICE_CLOSE,1);
double CCIWERT = iCCI(Symbol(),0,14,PRICE_CLOSE,0); //DoubleToStr("",2);
double SToWERT = iStochastic(Symbol(),0,14,3,3,MODE_SMA,0,MODE_MAIN,0);
double DWert = (SToWERT+RSIWert+CCIWERT)/3;
int counted_bars=IndicatorCounted(),
limit;
if(counted_bars>0)
counted_bars--;
limit=Bars-counted_bars;
if(limit>barsToProcess)
limit=barsToProcess;
for(int i=0;i<limit;i++)
{
ExtMapBuffer1[i]=DWert*MathRand()/32767;//MathRand()%2; //MathSrand(GetTickCount()); //MathRand()%1001;
}
return(0);
}