Friday, 28 December 2012

EA Builder Alternative


Expert advisor builders (generators)

http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/
Expert Advisor Builder for MetaTrader 4 is a well known web-based tool that is very basic and free. It's pretty old and it looks unsupported now, although there is a forum available.

http://eacreator.com/
EA Creator is a web-based expert advisors builder for MetaTrader 4. Unfortunately, it looks that it was abandoned.

http://eatree.com/
EATree is a software for building expert advisors for MetaTrader 4 and MetaTrader 5. Here we connect boxes that represents AND logic, OR logic, IF condition, conversion or mathematical functions, time series, indicators (system or custom) and others to create the main logic. Finally, we connect that logic to the special Trade box.

http://www.forexeadvisor.com/
ForexEAdvisor is also popular web-based expert advisor builder that is simple and free to use.

http://forexgenerator.com/
Forex Generator is a software for building expert advisors and technical indicators for MetaTrader 4 and MetaTrader 5. This application is the most similar to fxDreema. It uses visually connected blocks for creating a trading diagram. Each block represents some piece of code, a code function. In addition, there is a Block Editor to create and manage custom blocks. There is a forum available.

http://molanis.com/
Molanis is a set of Java-based products for building expert advisors and technical indicators for MetaTrader 4 and MetaTrader 5. A trading diagram is created by connecting a few simple specially designed blocks. There is a forum available.

http://noprogra.com/
NoProgra is a new software for building expert advisors for MetaTrader 4. The way of algorithm creation here is as they say in "natural language". Which means, that we can build our project in a way we speak, write and think. This platform is Java-based and it's currently free to download and use.

http://strategytune.com/
StrategyTune is a free and simple web tool for building expert advisors for MetaTrader 4. No installations and no registrations needed, you can start building EA's just right now.

http://www.iexpertadvisor.com/
Visual Traders Studio is a software for building expert advisors for MetaTrader 4. Six basic Element types (blocks) are used to create the trading logic - Start element, Note element, Variable element, Logic element, Function element and End element. There is a forumavailable.


EAbuilder_FX Dreema

I have been looking for EAbuilder and in this website are some

http://fxdreema.com/alternatives

Question is does anyone has experience with any of the above ? 
Basicaly I would look for anything that can provide good support and or good lessons on how to. I do want to build something complex.

Martingale code

I wrote a piece of code to do what you ask, I hope this helps.
There is not a expert adviser, is a code to add to yours experts.
=================================================


//+------------------------------------------------------------------+
//|                                                        test1.mq4 |
//|                        Copyright 2012, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
extern int MagicNumber=123;
extern double StartLotsize=0.01;
extern double MultiplierLot=2.0;
extern double StepOrder=10;
extern int MaxGrid=3;
//---------------------------------------------------------------------------------------
  int MultiplierPoint;
  double DigitsPoints;
  int BuyCnt;
  int SellCnt;
  double PipsBuy;
  double PipsSell;
  bool SendBuy;
  bool SendSell;
  double LotBuy;
  double LotSell;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
MultiplierPoint=1;
if(MarketInfo(Symbol(),MODE_DIGITS)==5||MarketInfo(Symbol(),MODE_DIGITS)==3) MultiplierPoint=10;
DigitsPoints=MarketInfo(Symbol(),MODE_POINT)*MultiplierPoint;
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
   BuyCnt=0;
   SellCnt=0;
   PipsBuy=0;
   PipsSell=0;
   SendBuy=false;
   SendSell=false;
   LotBuy=StartLotsize;
   LotSell=StartLotsize;
//----
   for(int i=0; i<OrdersTotal(); i++)
   {
   if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
   {
   if(OrderMagicNumber()==MagicNumber)
   {
   if(OrderType()==OP_BUY)
   {
   BuyCnt++;
   PipsBuy=(Bid-OrderOpenPrice())/DigitsPoints;
   }
   if(OrderType()==OP_SELL)
   {
   SellCnt++;
   PipsSell=(OrderOpenPrice()-Ask)/DigitsPoints;
   }
   }
   }
   }
//----
   if((BuyCnt<MaxGrid)&&(PipsBuy>=StepOrder))
   {
   LotBuy=NormLot(StartLotsize*MathMax(1,MathPow(MultiplierLot,BuyCnt)));
   SendBuy=true;
   }
   if((SellCnt<MaxGrid)&&(PipsSell>=StepOrder))
   {
   LotSell=NormLot(StartLotsize*MathMax(1,MathPow(MultiplierLot,SellCnt)));
   SendSell=true;
   }
//----
  if(SendBuy==true)
  {
  //send orders buy... with lot=LotBuy
  return(0);
  }
//----
  if(SendSell==true)
  {
  //send orders sell... with lot=LotSell
  return(0);
  }
//----
   return(0);
  }
//+------------------------------------------------------------------+
//Normalize lot                                                                                                        //
double NormLot(double LotSize)
{
int LotDigit;
//------------------------------------------------------
//Broker lot info
double MinLot=MarketInfo(Symbol(),MODE_MINLOT);
double MaxLot=MarketInfo(Symbol(),MODE_MAXLOT);
double LotStep=MarketInfo(Symbol(),MODE_LOTSTEP);
//------------------------------------------------------
//Calculate lot digits
if(LotStep==1) LotDigit=0;
if(LotStep==0.1) LotDigit=1;
if(LotStep==0.01) LotDigit=2;
if(LotStep==0.001) LotDigit=3;
//------------------------------------------------------
return(NormalizeDouble(MathMin(MathMax(LotSize,MinLot),MaxLot),LotDigit));
}

Thursday, 27 December 2012

iCustom fxsniper3cci


supaya indinya bisa di set di EA juga di deklarasikan
"extern int CCI_Period = 14"
"extern int T3_Period = 5"
"extern double b = 0.618"

Nah untuk nilai indi ini bisa di lihat pada mt4 --->terkan CTRL D , maka akan kelihatan nilai nya output keluaran hanya satu macam aja 
double x=iCustom(Symbol(),0,"fxsniper3cci",CCI_Period,T3_ Period,b,0,shif);
shif bisa di isi 0 (sekarang), 1( satu candel sebelum sekarang, 2(dua candel sebelum sekarang) dst.......
PHP Code:
double x=iCustom(Symbol(),0,"fxsniper3cci",CCI_Period,T3_Period,b,0,0);//(sekarang)
   
double xx=iCustom(Symbol(),0,"fxsniper3cci",CCI_Period,T3_Period,b,0,1);//satu candel sebelum sekarang
   
double xxx=iCustom(Symbol(),0,"fxsniper3cci",CCI_Period,T3_Period,b,0,2);//dua candel sebelum sekarang  
gitu deh gambarannya

==========================
kalau dilihat didata windows nya nilai outputnya hanya 1 nilainya bro
coba untuk cek value coba ini

PHP Code:
   double x=iCustom(Symbol(),0,"fxsniper3cci",CCI_Period,T3_Period,b,0,0);
   
double y=iCustom(Symbol(),0,"fxsniper3cci",CCI_Period,T3_Period,b,1,0);
   
double z=iCustom(Symbol(),0,"fxsniper3cci",CCI_Period,T3_Period,b,2,0);
   
Comment("nilai x",x,
          
"\n nilai y",y,
          
"\n nilai z",z);

iCustom CCI EMA

CCI EMA

the code in your post refers to it below.

for(i = limit; i >= 0; i--) {
cciTrendNow = iCustom(NULL, 0, "CCI EMA", CCIPeriod, MAPeriod, 1, i);
cciTrendPrevious = iCustom(NULL, 0, "CCI EMA", CCIPeriod, MAPeriod, 1, i+1);

================
All is says is: if CCI > 0 the trend is up: if < 0 the trend is down
for(i=limit; i>=0; i--)
            {
               int y = iBarShift(NULL,TimeFrame,Time[i]);
               double cciTrend = iCCI(NULL, TimeFrame, 50, PRICE_TYPICAL, y);
                      
                  
               TrendDoA[i]  = EMPTY_VALUE;
               TrendDoB[i]  = EMPTY_VALUE;
               Trend[i]     = iCustom(NULL,TimeFrame,IndicatorFileName,0,y);
               Direction[i] = Direction[i+1];
                  if (cciTrend>0) Direction[i] =  1;
                  if (cciTrend<0) Direction[i] = -1;
                  if (Direction[i]==-1) PlotPoint(i,TrendDoA,TrendDoB,Trend);
            }
         return(0);         
      }

Supertrend 3


The name of the indicator is Supertrend.
It only changes the color and know I think of adding a few pips when the indicator changes the signal, so I can search after the jump of the pips.

The code is something like this.

bool indBuy=false; 
bool indSell=false;

double sigBuy = iCustom(NULL,0,"SuperTrend",10,3,0,0);
double sigSell = iCustom(NULL,0,"SuperTrend",10,3,1,0);

if (sigBuy != EMPTY_VALUE) indBuy=true;
if (sigSell != EMPTY_VALUE) indSell=true; 

if (indBuy==true)
{
// place a buy order
}

if (indSell==true)
{
// place a sell order
}

Hope it helps.

======================

Lot's of thanks!! This was a really great help!! I haven't seen the fact with that EMPTY_VALUE
You're welcome.

As you know the value in the current bar may change since the bar is till not closed and the price can move up or down. You may want to take the signal from the previous closed bar by changing the code to

double sigBuy = iCustom(NULL,0,"SuperTrend",10,3,0,1);
double sigSell = iCustom(NULL,0,"SuperTrend",10,3,1,1);


===============================




Wednesday, 26 December 2012

SuperTrend 2

int trade() 
{
double trend4 = iCustom(NULL,0,"SuperTrend",5,1.5,1,3); //achat -> vente
double trend1 = iCustom(NULL,0,"SuperTrend",5,1.5,0,2); //achat -> vente


double trend3 = iCustom(NULL,0,"SuperTrend",5,1.5,1,2); //vente -> achat
double trend2 = iCustom(NULL,0,"SuperTrend",5,1.5,0,3); //vente -> achat

int total = OrdersTotal();
double ordre1;
double ordre2;


if(trend2 < 5 && trend3 < 5 && total == 0)//vente
{
ordre1 = OrderSend(Symbol(),OP_SELL,0.08,Bid,3,Bid+(5000*Point),Bid-(5000*Point),"EA de Greg3395",1,0,Red);
}

  if(trend2 > 5 && trend3 > 5 && total == 1) //achat
{
   if(OrderSelect(ordre1, SELECT_BY_TICKET))
  {
   if(OrderType()==OP_SELL)
   {
   OrderClose(OrderTicket(), 0.08, Bid, 3, CLR_NONE);
   }  
  } 



if(trend1 < 5 && trend4 < 5 && total == 0) //achat
{
ordre2 = OrderSend(Symbol(),OP_BUY,0.08,Ask,3,Ask-(5000*Point),Ask+(5000*Point),"EA de Greg3395",2,0,Blue);



if(trend1 > 5 && trend4 > 5 && total == 1) //achat
{
   if(OrderSelect(ordre2, SELECT_BY_TICKET))
  {
    if(OrderType()==OP_BUY)
    {
    OrderClose(OrderTicket(), 0.08, Ask, 3, CLR_NONE);
    }
  }
}

return(0);
}

supertrend value


i made something approaching what i want but i cant understand the behaviour of this EA : its following supertrend switches sometimes, but it also reacts when the market reaches supertrend value...
here are the interresting lines of this code :
//green supertrend and previous value
double super0 = iCustom(NULL,0,"SuperTrend",0,1);
double prevsuper0 = iCustom(NULL,0,"SuperTrend",0,2);
//red supertrend and previous value
double super1 = iCustom(NULL,0,"SuperTrend",1,1);
double prevsuper1 = iCustom(NULL,0,"SuperTrend",1,2);
// turns to red
if ((super1!=2147483647) && (prevsuper1==2147483647)) Order=SIGNAL_CLOSEBUY;
if ((super1!=2147483647) && (prevsuper1==2147483647)) Order=SIGNAL_SELL;
//turns to green
if ((super0!=2147483647) && (prevsuper0==2147483647)) Order=SIGNAL_CLOSESELL;
if ((super0!=2147483647) && (prevsuper0==2147483647)) Order=SIGNAL_BUY;
i also wonder why this weird value of 2147483647 when the line isnt of the same color as the buffer, instead of a clean EMPTY_VALUE...
thanks again!!!

iCustom(NULL, 0, "SuperTrend",Periods,Multiplier,TimeFrame,0,1); //uptrend value


Code:
 
iCustom(NULL,0,"SuperTrend",10,3,0,1) //buffer 0 ie uptrend
 
iCustom(NULL,0,"SuperTrend",10,3,1,1) //buffer 1 ie downtrend



Code:
int start()
  {
//----
   
      ExtMapBuffer1[1] = iCustom(NULL, 0, "SuperTrend",Periods,Multiplier,TimeFrame,0,1);  //uptrend value
 
      ExtMapBuffer1[2] = iCustom(NULL, 0, "SuperTrend",Periods,Multiplier,TimeFrame,1,1);  //downtrend value
      
      if(Bid <= ExtMapBuffer1[1]) 
      {
         TrendDirection = "Up!";
      }
      if(Bid >= ExtMapBuffer1[2]) 
      {
         TrendDirection = "Down!";
      }
   
      Comment("UpTrend: ", ExtMapBuffer1[1], "n", "DownTrend: ", ExtMapBuffer2[2], "n", "Trade Direction: ", TrendDirection);
   
//----
   return(0);
  }
We are our own best indicator.

I have put the following for a call to the indicator, would this be correct to get the current price? It only works on the output of the bar I am asking (which is fine) I believe and does this seem right?

Code:
//+------------------------------------------------------------------+
//|                                                SuperTrend V1.mq4 |
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
double ExtMapBuffer1[];
double ExtMapBuffer2[];

int      Periods = 3;
double   Multiplier = 1.25;
int      TimeFrame = 240;
string   TrendDirection = "Long";

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
  
      
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
   
      ExtMapBuffer1[1] = iCustom(NULL, 0, "SuperTrend",Periods,Multiplier,TimeFrame,0,1);  //downtrend value
 
      ExtMapBuffer1[2] = iCustom(NULL, 0, "SuperTrend",Periods,Multiplier,TimeFrame,1,1);  //uptrend value
      
      if(ExtMapBuffer1[1] < ExtMapBuffer1[2])
      {
         TrendDirection = "Down";
      }
   
      Comment("UpTrend: ", ExtMapBuffer1[1], "n", "DownTrend: ", ExtMapBuffer2[2], "n", "Trade Direction: ", TrendDirection);
   
//----
   return(0);
  }
I added the Timeframe option in the indicator so I can switch through the timeframes...


I think I got it! 

I changed to the following and it is outputting fine!

Code:
//+------------------------------------------------------------------+
//|                                                SuperTrend V1.mq4 |
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
double ExtMapBuffer1[];
double ExtMapBuffer2[];

int      Periods = 3;
double   Multiplier = 1.25;
int      TimeFrame = 240;
string   TrendDirection = "Long";


double   UpTrend,DownTrend;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
  
      
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
   
      //ExtMapBuffer1[1] = iCustom(NULL, 0, "SuperTrend",Periods,Multiplier,TimeFrame,0,1);  //uptrend value
 
      //ExtMapBuffer1[2] = iCustom(NULL, 0, "SuperTrend",Periods,Multiplier,TimeFrame,1,1);  //downtrend value
      UpTrend = iCustom(NULL, 0, "SuperTrend",Periods,Multiplier,TimeFrame,0,1);
      DownTrend = iCustom(NULL, 0, "SuperTrend",Periods,Multiplier,TimeFrame,1,1);
      
      /*if(Bid <= ExtMapBuffer1[1]) 
      {
         TrendDirection = "Up!";
      }
      if(Bid >= ExtMapBuffer1[2]) 
      {
         TrendDirection = "Down!";
      }
   
      //Comment("UpTrend: ", ExtMapBuffer1[1], "n", "DownTrend: ", ExtMapBuffer2[2], "n", "Trade Direction: ", TrendDirection);
   */
      Comment("UpTrend: ", UpTrend, "n", "DownTrend: ", DownTrend);
//----
   return(0);
  }
We are our own best indicator.









"built in" indicators

iCustom() is used for indicator that are not "built in" indicators
If the indicator is a "built in" then you do not need iCustom(). Here is a list of "built in" indicators :

So, if you are not going to use one of the above, you are going to have to use iCustom() for what you described

i have created my EA - ASCTrend.mq4



i have created my EA - ASCTrend.mq4 with MQ4 builder, which uses asctrend signal with ICustom function. it can open a BUY trade when UP signal, and SELL when DOWN.
i want to add to my EA some filter - with backtesting in some pairs, its look good fo filter with BBands ind, bud i dont know how to add this filter in my EA - something like that I think, but have no luck.

double Buy1_1 = iCustom(Symbol(),0,"PerkyAsctrend1",0,1);
double Buy2_1 = iCustom(NULL, 0, "BBands_Stop_v1", 4, 0, Current + 1);
double Buy2_2 = 1;

double Sell1_1 = iCustom(Symbol(),0,"PerkyAsctrend1",1,1);
double Sell2_1 = iCustom(NULL, 0, "BBands_Stop_v1", 5, 0, Current + 1);
double Sell2_2 = 1;

if (Buy1_1 && Buy2_1 > Buy2_2) Order = SIGNAL_BUY;

if (Sell1_1 && Sell2_1 > Sell2_2) Order = SIGNAL_SELL;













iCustom Question



I have an indicator which compares several values. I wish to bring those values into my EA. So far, what I've found, of the use of iCustom function is; calling the name of the indicator and comparing two different time periods of the same MA. How would I use iCustom to compare two different values of the same indicator.

For example:

Let's say that I have an MA of the average of the High and Low for a 15 min Period, and a MA of Close Price over 13 Periods, in the same Indicator. Let's say that I want to place a Buy, in my EA, when the MA of the Close Price crosses under the MA of the average of High/ Low, in the Indicator.


How would I utilize the iCustom Function to capture a state which occurs between two different MAs in the same Indicator?







 You just read the different indicators in your EA using icustom and do a compare

val1 = iCustom(NULL, 0,"sar_filter_alert",5,9,3,3,1,1,0.02,0.2,0,0);
val2 = iCustom(NULL, 0,"AsciiTrade",10,20,5,0,0);

Then if(val1 > val2 etc

or if you want to compare 2 values in the same indicator, change the values in the second read

val1 = iCustom(NULL, 0,"sar_filter_alert",5,9,3,3,1,1,0,0);
val2 = iCustom(NULL, 0,"sar_filter_alert",25,19,3,3,1,3,1,0);


Supertrend of a specific bar using iCustom

Hi homi,

Let�s assume we want to return the value of the indicator �Supertrend� of a specific bar using iCustom

If we want to get the returned value of the Supertrend first line:
We can write this price of code inside start() function:

Code:
double val=iCustom(NULL, 0, "SuperTrend",0,0,pos);
Here val will hold the returned value of Supertrend indicator(first line).

If you want the returned value of the second line, we can write:

Code:
double val=iCustom(NULL, 0, "SuperTrend",0,1,pos);
This is a program which will use Supertrend indicator using iCustom:


Code:
#property copyright "Coders Guru"
#property link      "http://www.forex-tsd.com"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,ExtMapBuffer2);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
   
//----
   return(0);
  }


int start()
  {
   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--;
   
   int pos=Bars-counted_bars;
   
     
 
   while(pos>=0)
     {
         ExtMapBuffer1[pos] = iCustom(NULL, 0, "SuperTrend",0,0,pos);
         ExtMapBuffer2[pos] = iCustom(NULL, 0, "SuperTrend",0,1,pos);

         pos--;
     }
     
     
     
//----
   return(0);
  }
//+------------------------------------------------------------------+

==================================================
Use something like this in your EA:

Buff0=iCustom(NULL,0,"Indicator Name",0,0); //Top color of indicator
Buff0=iCustom(NULL,0,"Indicator Name",0,1); //1-Back

Buff1=iCustom(NULL,0,"Indicator Name",1,0); //Next to top color of indicator
Buff1=iCustom(NULL,0,"Indicator Name",1,1); //1-Back

Modify the variables in the indicator itself, and recompile the indicator which will update the buffers and the indicator on the graph!
===================================================


iCustom(NULL,0,"SuperTrend",10,3,0,1) //buffer 0 ie uptrend
 
iCustom(NULL,0,"SuperTrend",10,3,1,1) //buffer 1 ie downtrend

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