Download MetaTrader 5
To add comments, please log in or register
Use searching on MQL5.community. It is easy!
vssshiva
115
vssshiva 2015.09.19 07:58 
//+------------------------------------------------------------------+
//|                                                       222222.mq4 |
//|                        Copyright 2012, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Maroon
#property indicator_width1 2
#property indicator_width2 2

extern int       FastEMA = 12;
extern int       SlowEMA =26;
extern int       SignalSMA = 9;
extern int       ARROWWIDTH = 3;

double buy[];
double sell[];
double m;


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_ARROW,EMPTY,2,Lime);
   SetIndexArrow(0,217);
   SetIndexBuffer(0,buy);
   SetIndexEmptyValue(0,0.0);
   SetIndexStyle(1,DRAW_ARROW,EMPTY,2,Maroon);
   SetIndexArrow(1,218);
   SetIndexBuffer(1,sell);
   SetIndexEmptyValue(1,0.0);
//----
   return(0);
  }
 
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
  
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{
  double Osma0,Osma1;
  for (int i = Bars - 1; i >= 0; i --)
  {
    Osma0 = iOsMA(NULL , 0 , FastEMA , SlowEMA ,SignalSMA , PRICE_WEIGHTED ,i);
    Osma1 = iOsMA(NULL , 0 , FastEMA , SlowEMA ,SignalSMA , PRICE_WEIGHTED ,i+1);
    buy [i] = 0; sell [i] = 0;
   
     if (Osma0 > 0 && Osma1 < 0)
    {
      buy [i] = High [i];
    }

    if (Osma0 < 0 && Osma1 > 0)
    {
      sell [i] = Low [i];
    }    
  }
  return(0);
}
 
//+------------------------------------------------------------------+

dear sir,

can some one add alerts to this indicator.

need alerts in given time frame which i can enable

if am in 15 minute chart and signal appear in one hour chart then alert comes to present chart what am watching.

thank u very much

here is  the code

Files:
whroeder1
13596
whroeder1 2015.09.19 14:54  
vssshiva: can some one add alerts to this indicator.
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  3. What you have only works on the current time frame.
/
To add comments, please log in or register