MQL4 - automated forex trading   /  

Code Base

Read Financial Magazines in MetaTrader 4 and MetaTrader 5!

Code Base  Indicators  Buy / sell indicator with alerts. To post a new code, please log in or register

Download MetaTrader 5 and visit MQL5.community Code Base
and Trade on the Go!
and Trade on the Go!
Couldn't find the right code? Order it in the Jobs section

This library is for
MetaTrader 4
Download MT 4 - 455 Kb

and Trade on the Go!

and Trade on the Go!

Name:
Buy / sell indicator with alerts.
Author: pankajbhaban (2011.04.14 09:57)
Rating: 8.2
Downloaded: 41323
Download:
 trendsignal.mq4 (3.9 Kb) View

This is the updated version of the indicator i uploaded previously at http://codebase.mql4.com/7121.

The basic logic is

It calculates number of bars on charts and then based on histogram it draws a arrow which is again confirmed when next opening bar price its high in case of buy arrow or low in case of sell signal, when both these conditions are satisfied it draws an arrow.

it is price behavior change It means if arrow has appeared price will change it direction a five bars sequence, where the central bar has higher maximum or lower minimum arrow shows central bar position.

Sound pop-up alert as well email alert have been added to it.

Recommended timeframe 1 hr.

41 comments: 1 2 3 4 5   To post a new comment, please log in or register
Open mql file and just click on compile tab and you get ex4 file in the same folder where you kept the mql file.
akram801:
akram801:

pankajbhaban thanks very much ...


i need the ex4 format

i have a problem in my mt4





14.05.2011 22:25 pankajbhaban
akram801:

pankajbhaban thanks very much ...


i need the ex4 format

i have a problem in my mt4



14.05.2011 15:28 akram801

pankajbhaban thanks very much ...


i need the ex4 format

i have a problem in my mt4

14.05.2011 15:26 akram801

trendsignalEA backtest.



08.05.2011 17:04 pankajbhaban
I do have EA made of it you can email me pankajbhaban@gmail.com to get it.
hummer2010:

I have about two indicators like this one. Please can someone convert this Indicator into and Expert Advisor.



30.04.2011 09:05 pankajbhaban

I have about two indicators like this one. Please can someone convert this Indicator into and Expert Advisor.

30.04.2011 08:25 hummer2010
 
 
//+------------------------------------------------------------------+
//| trendsignal.mq4
//| contact pankajbhaban@gmail.Com
//+------------------------------------------------------------------+
 
 
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DodgerBlue
#property indicator_color2 Magenta
 
//---- input parameters
extern int RISK=3;
extern int CountBars=350;
extern int Alert_Delay_In_Seconds=0;
extern bool Enablemail = true;
extern string subjectUp="Buy signal";
extern string subjectDown="Sell signal";
extern string textUp="Long ";
extern string textDown="Short ";
int SSP=9;
int PrevAlertTime=0;
//---- buffers
double val1[];
double val2[];
double alertBar;
 
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- indicator line
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,233);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,234);
SetIndexBuffer(0,val1);
SetIndexBuffer(1,val2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| SilverTrend_Signal |
//+------------------------------------------------------------------+
int start()
{
if (CountBars>=Bars) CountBars=Bars;
SetIndexDrawBegin(0,Bars-CountBars+SSP);
SetIndexDrawBegin(1,Bars-CountBars+SSP);
int i,shift,counted_bars=IndicatorCounted();
int i1,i2,K;
double Range,AvgRange,smin,smax,SsMax,SsMin,price;
bool uptrend,old;
//----
 
if(Bars<=SSP+1) return(0);
//---- initial zero
if(counted_bars<SSP+1)
{
for(i=1;i<=SSP;i++) val1[CountBars-i]=0.0;
for(i=1;i<=SSP;i++) val2[CountBars-i]=0.0;
}
//----
 
K=33-RISK;
for (shift = CountBars-SSP; shift>=0; shift--)
{
 
Range=0;
AvgRange=0;
for (i1=shift; i1<=shift+SSP; i1++)
{AvgRange=AvgRange+MathAbs(High[i1]-Low[i1]);
}
Range=AvgRange/(SSP+1);
 
SsMax=High[shift]; SsMin=Low[shift];
for (i2=shift;i2<=shift+SSP-1;i2++)
{
price=High[i2];
if(SsMax<price) SsMax=price;
price=Low[i2];
if(SsMin>=price) SsMin=price;
}
 
smin = SsMin+(SsMax-SsMin)*K/100;
smax = SsMax-(SsMax-SsMin)*K/100;
val1[shift]=0;
val2[shift]=0;
if (Close[shift]<smin)
{
uptrend = false;
}
if (Close[shift]>smax)
{
uptrend = true;
}
if (uptrend!=old && uptrend==true
27.04.2011 11:25 pankajbhaban   
ibp:

Hi Pankajbhaban

Fantastic indicator

Do you if possible to trigger order direct from the B/S Signal ?

if possible can Y issue the code ?

Congratulations in advance

jmgphotos.biz


pankajbhaban:
Look at the both codes they both are totally different and even the signal are different.
mydone:
http://codebase.mql4.com/ru/7514 that's what it is/ тв you are just a common cheater/ It's very well known Sidus bago method on 2 mas and rsi



pankajbhaban:
Look at the both codes they both are totally different and even the signal are different.
mydone:
http://codebase.mql4.com/ru/7514 that's what it is/ тв you are just a common cheater/ It's very well known Sidus bago method on 2 mas and rsi



thank' much its a best signal for buy-sell
26.04.2011 07:29 sureshkansara

Hi Pankajbhaban

Fantastic indicator

Do you if possible to trigger order direct from the B/S Signal ?

if possible can Y issue the code ?

Congratulations in advance

jmgphotos.biz

25.04.2011 15:59 ibp
Yeah i do use indicator in trading, i also use other technical to filter the signal, foremost i use EA based on trendsignal for automated trading.
mydone:

Do you use your indi in trading.What can you say or advise about it?



21.04.2011 11:17 pankajbhaban