Re: MT4 Indicator requests and ideas

9501
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

9502
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
These users thanked the author ionone for the post:
tbn98

Re: MT4 Indicator requests and ideas

9503
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.
These users thanked the author mrtools for the post (total 7):
sal, mades, josi, talaate, Cazz223, Antonio, pipsquirrel

Re: MT4 Indicator requests and ideas

9505
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,
Attachments
Cheers,

""There is nothing to fear but fear itself"" - Franklin D. Roosevelt

Rob


Re: MT4 Indicator requests and ideas

9506
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.
These users thanked the author mrtools for the post (total 15):
tbn98, vvFish, Jimmy, RplusT, Holmes27, Sutatong, simontw, Cazz223, Antonio, cinare, pipsquirrel, Mundu19, AnCapFX, Kenrobert1, Jedidiah

Re: MT4 Indicator requests and ideas

9510
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


Who is online

Users browsing this forum: Amazon [Bot], kvak, Majestic-12 [Bot], Nanyuki, rafl99, Steam1, Takashi12 and 90 guests