Page 951 of 2041

Re: MT4 Indicator requests and ideas

Posted: Thu May 07, 2020 11:38 pm
by TEAMTRADER
Could an indicator be coded that compares the value of DEMA to SMMA? EG: when the DEMA is xx points away from SMMA it will draw a vertical line on screen to show the extreme movement and warn of immediate exit.

OR, if that is not achievable, code an indicator that does the comparison with ema's only? I already hold an indicator that did this but it has stopped working on all charts and all MT4 platforms - but I have copied and pasted the code below in case it can be fixed and adapted to different ma's.
Thanks

TEAMTRADER
COPY

Code: Select all

//+------------------------------------------------------------------+
//|                                                      EMA_Gap.mq4 |
//|                                                     EB |
//|                                              |
//+------------------------------------------------------------------+
#property copyright "EB"
#property link      ""
#property version   "1.00"
#property strict

extern int EMA1=6;
extern int EMA2=8;
extern int Gap=144;
int LineCounter=0;
datetime last_time;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   for(int i=1000; i>1; i--)
   {
      PlotSignal(i);
   }
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
    for(int i=0; i<=LineCounter; i++)
    {
      ObjectDelete("EMA Gap Buy Signal "+i);
      ObjectDelete("EMA Gap Sell Signal "+i);
    }
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
      if(last_time!=Time[0])
      {
         PlotSignal(1);
         last_time=Time[0];
      }
  }
//+------------------------------------------------------------------+

void PlotSignal(int bar)
{
   int digits;
   double ema1, ema2, gap,diff;
   
    digits=SymbolInfoInteger(Symbol(),SYMBOL_DIGITS);
    
    if(digits==3 || digits==5) gap=10*Gap;
    else gap=Gap;  
    gap=NormalizeDouble(MathPow(0.1,digits)*gap,digits);  
    Print("GAP: ",gap);
    ema1=iMA(NULL,0,EMA1,0,MODE_EMA,PRICE_CLOSE,bar);
    ema2=iMA(NULL,0,EMA2,0,MODE_EMA,PRICE_CLOSE,bar);
    diff=NormalizeDouble(MathAbs(ema1-ema2),digits);
    //Short: ema above long ema by gap pips, sell sinal for reversal
    if(diff>=gap && ema1>ema2)
    {
      ObjectCreate(ChartID(),"EMA Gap Sell Signal "+LineCounter,OBJ_VLINE,0,Time[bar],Bid);
      ObjectSetInteger(ChartID(),"EMA Gap Sell Signal "+LineCounter,OBJPROP_COLOR,Red);
      LineCounter++;
    }
    else if(diff>=gap && ema1<ema2)
    {
      ObjectCreate(ChartID(),"EMA Gap Buy Signal "+LineCounter,OBJ_VLINE,0,Time[bar],Bid);
      ObjectSetInteger(ChartID(),"EMA Gap Buy Signal "+LineCounter,OBJPROP_COLOR,Blue);
      LineCounter++;    
    }
    
}

Re: MT4 Indicator requests and ideas

Posted: Fri May 08, 2020 12:37 am
by ionone
tbn98 wrote: Thu May 07, 2020 10:42 pm Hey mrtools is it possible to include this moving average (zero hull) Zero lag - Hull moving average (alerts).ex4 to this trend envelope indicator Trend envelopes(mtf+alerts).ex4 as an option to choose?
It would be really nice of you if you make it happen.
Also i don't have the mq4 files if thats a problem because i got these indicators on this forum the ma is modified from you and the other one from mladen.

Best regards
that's a good idea. Integrate that smoothing in all other already existing indicators that would be awesome

Re: MT4 Indicator requests and ideas

Posted: Fri May 08, 2020 1:26 am
by mrtools
talaate wrote: Thu May 07, 2020 7:51 am
Hi Mrtools
The new supertrend is really optimistic one. However, in display type option there is option called "Display Supertrend line and signal (arrow)", the signal (arrow) looks arrow type 159 which can not be changed to another arrow type. I hope if it is possible to may add signal (arrow) type option and add OnFirstbar option
Thanks and
God Blessing You and all Members
Made it so the signal big dot can be changed,also added arrowsOnFirst the signal will shift but may look kinda funky on larger time frames.

Re: MT4 Indicator requests and ideas

Posted: Fri May 08, 2020 3:13 am
by mades
mrtools wrote: Fri May 08, 2020 1:26 am

Made it so the signal big dot can be changed,also added arrowsOnFirst the signal will shift but may look kinda funky on larger time frames.
Kinda interesting what you can do with this indi. On the picture below is today's very choppy and hard to scalp EURUSD 1M chart. Keep working on it MrTools :)

Re: MT4 Indicator requests and ideas

Posted: Fri May 08, 2020 4:21 am
by Senior Rob
1 hour box with alerts

Hello, this is my first time posting here so please forgive me if this has already been done before.

I need an indicator which draws a box for the first hour of the New York session, 8am to 9am West Coast time in my case, with alerts for a close above the high of that session and a close below the low of that session as per the attached.

Thank you for your help

Cheers,

Re: MT4 Indicator requests and ideas

Posted: Fri May 08, 2020 5:17 am
by mrtools
tbn98 wrote: Thu May 07, 2020 10:42 pm Hey mrtools is it possible to include this moving average (zero hull) Zero lag - Hull moving average (alerts).ex4 to this trend envelope indicator Trend envelopes(mtf+alerts).ex4 as an option to choose?
It would be really nice of you if you make it happen.
Also i don't have the mq4 files if thats a problem because i got these indicators on this forum the ma is modified from you and the other one from mladen.

Best regards
Made this version.

Re: MT4 Indicator requests and ideas

Posted: Fri May 08, 2020 5:56 am
by talaate
mrtools wrote: Fri May 08, 2020 1:26 am

Made it so the signal big dot can be changed,also added arrowsOnFirst the signal will shift but may look kinda funky on larger time frames.
GOD BLESSING YOU

May I ask for histo version when you have time :)

Re: MT4 Indicator requests and ideas

Posted: Fri May 08, 2020 7:24 am
by vvFish
mrtools wrote: Fri May 08, 2020 5:17 am

Made this version.
;) :thumbup:
You are just a magician

Re: MT4 Indicator requests and ideas

Posted: Fri May 08, 2020 8:17 am
by MaxTorque
Hello mrtool,

please can you adjust this indicator.

Thank you very much.

Re: MT4 Indicator requests and ideas

Posted: Fri May 08, 2020 9:01 am
by fadhayemustafa
Senior Rob wrote: Fri May 08, 2020 4:21 am 1 hour box with alerts

Hello, this is my first time posting here so please forgive me if this has already been done before.

I need an indicator which draws a box for the first hour of the New York session, 8am to 9am West Coast time in my case, with alerts for a close above the high of that session and a close below the low of that session as per the attached.

Thank you for your help

Cheers,

I think if you change the time zone and change the hours what you are looking forward it will work