Wednesday, 26 December 2012

I-Customer Section for Expert Advisors



hello traders and programmers

i hope i�m right here to open this new thread , the idea is to post ONLY expert advisor code of ALL INDICATORS what you know for programming and test your own expert advisor .
SORRY FOR MY BAD ENGLISH.......

the form looks like a "FUNCTION" - my first examples :

Indikator: TURBO JRSX: 

Int CheckTurboJRSX()
{
double rsxcurr = 0,rsxprev1 = 0,rsxprev2 = 0;
rsxcurr = iCustom(Symbol(), Period(), "Turbo_JRSX", 17, 0, 1);
rsxprev1 = iCustom(Symbol(), Period(), "Turbo_JRSX", 17, 0, 2);
rsxprev2 = iCustom(Symbol(), Period(), "Turbo_JRSX", 17, 0, 3);

if (rsxcurr > rsxprev1 && rsxcurr > 30 && rsxprev1 < 30) return ( 1) ; //BUY
if (rsxcurr < rsxprev1 && rsxcurr < 70 && rsxprev1 > 70) return ( -1) ; //SELL
return(0);
}
FUNCTION CALLING:
if(CheckTurboJRSX()== 1) {example: open order buy ....}
if(CheckTurboJRSX()==-1) {example: open order sell ....}
-----------------------------------------------------------------------

Indikator: Parabolic Sar:

int CheckParabolicSar()
{
double sarCurrent = iSAR(NULL, 0, 0.02, 0.2, 0);
double sarPrevious = iSAR(NULL, 0, 0.02, 0.2, 1);
if(sarCurrent <= Ask && sarPrevious>sarCurrent) return ( 1) ; //BUY
if(sarCurrent >= Bid && sarPrevious<sarCurrent) return ( -1) ; //SELL
return(0);
}
FUNCTION CALLING:
if(CheckParabolicSar()== 1 {example: open order buy ....}
if(CheckParabolicSar()==-1 {example: open order sell ....}
note: parabolic sar is standard indicator , it`s not needed to attach for downloading....
-----------------------------------------------------------------------

Indikator: Fisher:

EXTERN VARIABLES:

extern int FisherPeriod = 5;
extern double UP_Value = 0.25;
extern double DN_Value =-0.25;
int FisherCheck()
{
double FisherUP = iCustom(NULL,0,"Fisher_Yur4ik",FisherPeriod,1,0);
double FisherDN = iCustom(NULL,0,"Fisher_Yur4ik",FisherPeriod,2,0);

if(FisherUP>UP_Value) return ( 1) ; //BUY
if(FisherDN<DN_Value) return (-1); //SELL
return (0);
}
FUNCTION CALLING:

if(FisherCheck()== 1 {example: open order buy ....}
if(FisherCheck()==-1 {example: open order sell ....}
-----------------------------------------------------------------------

Indikator: iBullsPower/iBearsPower:

EXTERN VARIABLES:

extern int BullBearPeriod=5;
int CheckiBullsBearsPower()
{
double bull = iBullsPower(NULL,0,BullBearPeriod,PRICE_CLOSE,1);
double bear = iBearsPower(NULL,0,BullBearPeriod,PRICE_CLOSE,1);

if(bull +bear>0) return ( 1) ; //BUY
if(bull+bear<0) return ( -1) ; //SELL
return(0);
}
FUNCTION CALLING:

if(CheckiBullsBearsPower()== 1 {example: open order buy ....}
if(CheckiBullsBearsPower()==-1 {example: open order sell ....}
note: iBullsPower and iBearsPower are standard indicators , it`s not needed to attach for downloading....

-----------------------------------------------------------------------

Indikator: Support and Resistance:

int CheckSupportResident()
{
double iTmpR = iCustom(Symbol(),0,"Support and Resistance",0,0);
double iTmpS = iCustom(Symbol(),0,"Support and Resistance",1,0);
if (Close[0]==iTmpR) return ( 1) ; //BUY
if (Close[0]==iTmpS) return ( -1) ; //SELL
return(0);
}
FUNCTION CALLING:

if(CheckSupportResident()== 1 {example: open order buy ....}
if(CheckSupportResident()==-1 {example: open order sell ....}
-----------------------------------------------------------------------

Indikator: TrendEnvelopes_v2:

EXTERN VARIABLES:

extern int SignalCandle =1;
extern int MA_Period =34;

Int CheckTrendEnvelopes_V2()
{
double TrendEnv_long = iCustom(Symbol(),Period(),"TrendEnvelopes_v2",MA_P eriod,0,SignalCandle); //buy
double TrendEnv_short = iCustom(Symbol(),Period(),"TrendEnvelopes_v2",MA_P eriod,1,SignalCandle); //sell

(TrendEnv_long <9999) return ( 1) ; //BUY
(TrendEnv_short <9999) return ( -1) ; //SELL
return(0);
}
FUNCTION CALLING:

if(CheckTrendEnvelopes_V2()== 1 {example: open order buy ....}
if(CheckTrendEnvelopes_V2()==-1 {example: open order sell ....}
-----------------------------------------------------------------------

hope this samples help to inspirit this thread..... will add more indicators next time .......

have fun and greetings from austria

forex2006
 Attached Files
  • File Type: mq4 Turbo_JRSX.mq4 (2.7 KB, 51 views)
  • http://www.forex-tsd.com/attachments/metatrader-4-mql-4-development-course/80765d1238265180-icustom-function-turbo_jrsx.mq4
  • File Type: mq4 Fisher_Yur4ik.mq4 (2.0 KB, 42 views)
  • http://www.forex-tsd.com/attachments/metatrader-4-mql-4-development-course/80766d1238266186-icustom-function-fisher_yur4ik.mq4
  • File Type: mq4 Support and Resistance.mq4 (5.2 KB, 44 views)
  • http://www.forex-tsd.com/attachments/metatrader-4-mql-4-development-course/80767d1238267548-icustom-function-support-resistance.mq4
  • File Type: mq4 TrendEnvelopes_v2.mq4 (4.2 KB, 52 views)
  • http://www.forex-tsd.com/attachments/metatrader-4-mql-4-development-course/80768d1238267853-icustom-function-trendenvelopes_v2.mq4

2 comments:

  1. We invented the invented the ultimate 100% automated Ferox Money machine
    Don’t let them tell you that Forex Trading is something reserved for experts and rookies don’t stand a chance in these shark infested waters. If you want to bdouble up your income in a few months by using an automated system that doesn’t require a degree in engineering or finance to use, there is no need to look any further. Say goodbye to pseudo-gurus who urge you to follow them blindly with no guarantee for success and risk your savings. Jump on the bandwagon right now, by joining those who make a small fortune each day with these trading robots.
    forex robots
    forex expert advisors
    best forex robots
    forex automated system
    best forex ea

    ReplyDelete
  2. Hello Everyone,

    I've created a list of the highest ranking FOREX brokers:
    1. Most Recommended Forex Broker
    2. eToro - $50 min. deposit.

    Here is a list of money making forex tools:
    1. ForexTrendy - Recommended Odds Software.
    2. EA Builder - Custom Indicators Autotrading.
    3. Fast FX Profit - Secret Forex Strategy.

    Hopefully these lists are helpful to you.

    ReplyDelete