//+------------------------------------------------------------------+ //+------------------------------------------------------------------+ #property copyright "Gideon Smolders copyright 2007" #property link "MetaTrader Group" #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Coral #property indicator_color2 White //---- input parameters extern int RSIfast =3; extern int RSIslow =10; extern int StochFast =4; extern int StochSlow =10; extern int CCIperiod =34; //---- buffers double ExtMapBuffer0[]; double ExtMapBuffer1[]; double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorBuffers(3); SetIndexEmptyValue(0,0.0); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,234); SetIndexBuffer(0,ExtMapBuffer0); SetIndexEmptyValue(1,0.0); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,233); SetIndexBuffer(1,ExtMapBuffer1); SetIndexEmptyValue(2,0.0); SetIndexStyle(2,DRAW_ARROW); SetIndexArrow(2,172); SetIndexBuffer(2,ExtMapBuffer2); IndicatorShortName("RSI_Arrows"); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- for (int i=Bars-50; i>=0; i--) { double prevtime; if (prevtime != Time[0]) { RefreshRates(); prevtime=Time[0]; } double StochSignal0 = iStochastic(Symbol(),0,StochFast,StochFast,1,MODE_LWMA,1,MODE_SIGNAL,i); double StochSignal1 = iStochastic(Symbol(),0,StochFast,StochFast,1,MODE_LWMA,1,MODE_SIGNAL,i+1); double StochSignal0slow = iStochastic(Symbol(),0,StochSlow,StochSlow,1,MODE_LWMA,1,MODE_SIGNAL,i); double StochSignal1slow = iStochastic(Symbol(),0,StochSlow,StochSlow,1,MODE_LWMA,1,MODE_SIGNAL,i+1); double CCIslow0 = iCCI(Symbol(),0,7,PRICE_OPEN,i); double CCIslow1 = iCCI(Symbol(),0,7,PRICE_OPEN,i+1); double CCIfast0 = iCCI(Symbol(),0,7,PRICE_CLOSE,i); double CCIfast1 = iCCI(Symbol(),0,7,PRICE_CLOSE,i+1); //- Sell Arrows --- if ( (StochSignal0slow<80 && StochSignal1slow>80 && StochSignal0<StochSignal1 && CCIfast0<CCIslow0)|| (StochSignal0<80 && StochSignal1>80 && StochSignal0<StochSignal0slow && StochSignal1>StochSignal1slow && CCIfast0<CCIslow0) ) ExtMapBuffer0[i]=High[i]+(5*Point);//High arrow Sell //- Buy Arrows ---- if ( (StochSignal0slow>20 && StochSignal1slow<20 && StochSignal0>StochSignal1 && CCIfast0>CCIslow0)|| (StochSignal0>20 && StochSignal1<20 && StochSignal0>StochSignal0slow && StochSignal1<StochSignal1slow && CCIfast0>CCIslow0) ) ExtMapBuffer1[i]=Low[i]-(5*Point);//Low arrow Buy } //---- return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Series array that contains open time of each bar
Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Indicator Curves created:
Implements a curve of type DRAW_ARROW
Indicators Used:
Stochastic oscillator
Commodity channel index
Custom Indicators Used:
Order Management characteristics:
Other Features: