5g3dmuftnecnle82r4_ih7okhbe

Author: Copyright � 2009, ������� ��������
Indicators Used
Stochastic oscillator
1 Views
0 Downloads
0 Favorites
5g3dmuftnecnle82r4_ih7okhbe
//+------------------------------------------------------------------+
//|                                               ñòîõàñòèê òåñò.mq4 |
//|                               Copyright © 2009, Õëûñòîâ Âëàäèìèð |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, Õëûñòîâ Âëàäèìèð"
#property link      ""

int start()
  {
   int    counted_bars=IndicatorCounted(),Ñèìâîë;
   double Stoch_S  = iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);
   color ÖÂÅÒ=öâåò(Stoch_S);
   string òåêñò = DoubleToStr(Stoch_S,0);
   if (Stoch_S > 50) Ñèìâîë=241; else Ñèìâîë=242;
   ObjectCreate(" ST "+Time[0], OBJ_ARROW,1,Time[0], 20,0,0,0,0);
   ObjectSet   (" ST "+Time[0], OBJPROP_ARROWCODE,Ñèìâîë);
   ObjectSet   (" ST "+Time[0], OBJPROP_COLOR,ÖÂÅÒ );
   return(0);
  }
//+------------------------------------------------------------------+
color öâåò(double i)
{
  int BB=0;
  int GG=255-i*2.55;
  int RR=i*2.55;
  return((BB<<16)^(GG<<8)^(RR));
}

Comments