Indicators: Doda-EMA Indicator

 

Doda-EMA Indicator:

Gives Buy, Sell and Exit signals based on EMA

Author: gopal krishan doda

 

"Cut your losses small & ride the profit long"

This is great advice.

Please tell me, in a losing position, how do I know that price will continue against me so I can cut my loss??

also, in a winning position, how do I know that price will continue in my favor so I can ride the profit long??

Thank you for your wisdom.

 
michaelB:

"Cut your losses small & ride the profit long"

This is great advice.

Please tell me, in a losing position, how do I know that price will continue against me so I can cut my loss??

also, in a winning position, how do I know that price will continue in my favor so I can ride the profit long??

Thank you for your wisdom.



For that, you need to use some stop-loss indicator like Parabolic SAR, Kijun-sen line of Ichimoku or Donchian Channel. Will post Doda-Donchain indicator in coming days, that will help you a lot.

Gopal Krishan Doda

 

michaelB:

"Cut your losses small & ride the profit long"

This is great advice.

Please tell me, in a losing position, how do I know that price will continue against me so I can cut my loss??

also, in a winning position, how do I know that price will continue in my favor so I can ride the profit long??

Thank you for your wisdom.



Hello,

As I mentioned earlier about Doda-Donchian indicator, you can check the same on http://codebase.mql4.com/en/code/9986. It will solve your stop-loss problem

Hope it will help you.

 
I just want to say thank You, this is a great indicator. I usually trade naked, but this indicator is well worth being in my charts.
 
csbueno:
I just want to say thank You, this is a great indicator. I usually trade naked, but this indicator is well worth being in my charts.

Thanks for your positive feedback & it's my pleasure that you like this indicator. Will surely share more such indicators in coming days with all of you.

Doda

 

gkdoda thanks for the indicator. it is one of the best i ve found yet.

michaelB my advise to u is that u shouldalways have target anytime u are in a trade. what i mean by target is the no of pips u want to make. if it is say 15pips, immediately u reach it that is it. but if u can't make up to that, what is your worst case scenario, 8pip? it depends on your target.



gkdoda:

michaelB:

"Cut your losses small & ride the profit long"

This is great advice.

Please tell me, in a losing position, how do I know that price will continue against me so I can cut my loss??

also, in a winning position, how do I know that price will continue in my favor so I can ride the profit long??

Thank you for your wisdom.



For that, you need to use some stop-loss indicator like Parabolic SAR, Kijun-sen line of Ichimoku or Donchian Channel. Will post Doda-Donchain indicator in coming days, that will help you a lot.

Gopal Krishan Doda

 

Hello salakosunday,


The target depends upon person to person risk-appetite, time-horizon and knowledge. A person is who is trading on H4 timeframe and has just taken position on breakout, might want to wait for few hours to few days for the target of 400-500 pips. On the other hand, on the same breakout on timeframe M15, a person may exit happily after getting 15 pips. It's upto you. I suggest to trade in Forex on higher timeframe; not less than H4, with strict stop-loss. You'll have sound sleep with good pips. :-)

Hope it will help you.

 
<Deleted>
 

Hi Doda,

Thanks for this indicator. I find it very helpful.

Do you think you can add up and down arrow at the candle instead of the vert and hori lines ?

Enclosed below is an indi for EMA cross but for 2 emas only.

Putting arrows would be very visually convincing !!


tq

rozali

//+------------------------------------------------------------------+
//|                                         EMA-Crossover_Signal.mq4 |
//|         Copyright © 2005, Jason Robinson (jnrtrading)            |
//|                   http://www.jnrtading.co.uk                     |
//+------------------------------------------------------------------+
/*
  +------------------------------------------------------------------+
  | Allows you to enter two ema periods and it will then show you at |
  | Which point they crossed over. It is more usful on the shorter   |
  | periods that get obscured by the bars / candlesticks and when    |
  | the zoom level is out. Also allows you then to remove the emas   |
  | from the chart. (emas are initially set at 5 and 6)              |
  +------------------------------------------------------------------+
*/   
#property copyright "Copyright © 2005, Jason Robinson (jnrtrading)"
#property link      "http://www.jnrtrading.co.uk"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 SeaGreen
#property indicator_color2 Red
double CrossUp[];
double CrossDown[];
extern int FasterEMA = 14;
extern int SlowerEMA = 21;
extern bool SoundON=true;
double alertTag;
 double control=2147483647;
 
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0, DRAW_ARROW, EMPTY,3);
   SetIndexArrow(0, 233);
   SetIndexBuffer(0, CrossUp);
   SetIndexStyle(1, DRAW_ARROW, EMPTY,3);
   SetIndexArrow(1, 234);
   SetIndexBuffer(1, CrossDown);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start() {
   int limit, i, counter;
   double fasterEMAnow, slowerEMAnow, fasterEMAprevious, slowerEMAprevious, fasterEMAafter, slowerEMAafter;
   double Range, AvgRange;
   int counted_bars=IndicatorCounted();
//---- check for possible errors
   if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   
   for(i = 0; i <= limit; i++) {
   
      counter=i;
      Range=0;
      AvgRange=0;
      for (counter=i ;counter<=i+9;counter++)
      {
         AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);
      }
      Range=AvgRange/10;
       
      fasterEMAnow = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i);
      fasterEMAprevious = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i+1);
      fasterEMAafter = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i-1);
      slowerEMAnow = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, i);
      slowerEMAprevious = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, i+1);
      slowerEMAafter = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, i-1);
      
      if ((fasterEMAnow > slowerEMAnow) && (fasterEMAprevious < slowerEMAprevious) && (fasterEMAafter > slowerEMAafter)) {
         CrossUp[i] = Low[i] - Range*0.5;
      }
      else if ((fasterEMAnow < slowerEMAnow) && (fasterEMAprevious > slowerEMAprevious) && (fasterEMAafter < slowerEMAafter)) {
          CrossDown[i] = High[i] + Range*0.5;
      }
        if (SoundON==true && i==1 && CrossUp[i] > CrossDown[i] && alertTag!=Time[0]){
         Alert("EMA Cross Trend going Down on ",Symbol()," ",Period());
        alertTag = Time[0];
      }
        if (SoundON==true && i==1 && CrossUp[i] < CrossDown[i] && alertTag!=Time[0]){
       Alert("EMA Cross Trend going Up on ",Symbol()," ",Period());
        alertTag = Time[0];
        } 
  }
   return(0);
}
 

Hello mrozali1,

Many indicators uses arrow on screen to show result and sometimes you get multiple arrows on screen because of that. Very few indicators uses line strategy. So, I stick to it on all my indicators. And secondly, I truly accept that I don't know how to put arrow codes. Perhaps, someone else can do that.


DodaCharts

Reason: