Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1511 (permalink)  
Old 07-10-2009, 09:59 AM
Junior Member
 
Join Date: Jul 2009
Posts: 5
daylight is on a distinguished road
the diffrent

hello all
can help me

what the diffrent EMA5c and EMA5p
what the mean (EMA5c>EMA10c && EMA5p<=EMA10p)||(EMA5c>EMA10c))

double EMA5c = iMA(NULL,TimeFrame,5,0,MODE_EMA,PRICE_CLOSE, 0);
double EMA10c = iMA(NULL,TimeFrame,10,0,MODE_EMA,PRICE_CLOSE,0);
double EMA5p = iMA(NULL,TimeFrame,5,0,MODE_EMA,PRICE_CLOSE, 1);
double EMA10p = iMA(NULL,TimeFrame,10,0,MODE_EMA,PRICE_CLOSE,1);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1512 (permalink)  
Old 07-10-2009, 11:47 AM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
The names are just variable names and don't really have any meaning as such. Programmers will usually choose variable names so that it's self explanatory what kind of value they're supposed to hold. Looking at those two it seems the programmer has chosen to add the suffix c to the current bars variable and p to the previous bars variable.

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1513 (permalink)  
Old 07-10-2009, 06:27 PM
Junior Member
 
Join Date: Jul 2009
Posts: 8
paytongannaway is on a distinguished road
hey man got a question, I have an indicator that a friend gave me that I have been demoing for a couple weeks now and love it. Short explanation, an arrow will show up on my charts telling me to which way to play the movement. Using it on 30m charts so it doesn't come up too often. Is there a way to make it when the arrow shows up for the long position it will close out my short position and go long, or if there is no short position just go long. Also vice versa with the short signal?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1514 (permalink)  
Old 07-10-2009, 07:06 PM
Junior Member
 
Join Date: Jul 2009
Posts: 8
paytongannaway is on a distinguished road
I didnt see an edit button so here is the code. It doesn't seem as if it would be too difficult just to add in the buy or sell code. This is from the zigzag code. Free ind.
Code:
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
//---- indicator parameters
extern int ExtDepth=12;
extern int ExtDeviation=5;
extern int ExtBackstep=3;
//---- indicator buffers
double ZigzagBuffer[];
double HighMapBuffer[];
double LowMapBuffer[];
int level=3; // recounting's depth 
bool downloadhistory=false;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   IndicatorBuffers(3);
//---- drawing settings
   SetIndexStyle(0,DRAW_SECTION);
//---- indicator buffers mapping
   SetIndexBuffer(0,ZigzagBuffer);
   SetIndexBuffer(1,HighMapBuffer);
   SetIndexBuffer(2,LowMapBuffer);
   SetIndexEmptyValue(0,0.0);

//---- indicator short name
   IndicatorShortName("ZigZag("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")");
//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   int i, counted_bars = IndicatorCounted();
   int limit,counterZ,whatlookfor;
   int shift,back,lasthighpos,lastlowpos;
   double val,res;
   double curlow,curhigh,lasthigh,lastlow;

   if (counted_bars==0 && downloadhistory) // history was downloaded
     {
      ArrayInitialize(ZigzagBuffer,0.0);
      ArrayInitialize(HighMapBuffer,0.0);
      ArrayInitialize(LowMapBuffer,0.0);
     }
   if (counted_bars==0) 
     {
      limit=Bars-ExtDepth;
      downloadhistory=true;
     }
   if (counted_bars>0) 
     {
      while (counterZ<level && i<100)
        {
         res=ZigzagBuffer[i];
         if (res!=0) counterZ++;
         i++;
        }
      i--;
      limit=i;
      if (LowMapBuffer[i]!=0) 
        {
         curlow=LowMapBuffer[i];
         whatlookfor=1;
        }
      else
        {
         curhigh=HighMapBuffer[i];
         whatlookfor=-1;
        }
      for (i=limit-1;i>=0;i--)  
        {
         ZigzagBuffer[i]=0.0;  
         LowMapBuffer[i]=0.0;
         HighMapBuffer[i]=0.0;
        }
     }
      
   for(shift=limit; shift>=0; shift--)
     {
      val=Low[iLowest(NULL,0,MODE_LOW,ExtDepth,shift)];
      if(val==lastlow) val=0.0;
      else 
        { 
         lastlow=val; 
         if((Low[shift]-val)>(ExtDeviation*Point)) val=0.0;
         else
           {
            for(back=1; back<=ExtBackstep; back++)
              {
               res=LowMapBuffer[shift+back];
               if((res!=0)&&(res>val)) LowMapBuffer[shift+back]=0.0; 
              }
           }
        } 
      if (Low[shift]==val) LowMapBuffer[shift]=val; else LowMapBuffer[shift]=0.0;
      //--- high
      val=High[iHighest(NULL,0,MODE_HIGH,ExtDepth,shift)];
      if(val==lasthigh) val=0.0;
      else 
        {
         lasthigh=val;
         if((val-High[shift])>(ExtDeviation*Point)) val=0.0;
         else
           {
            for(back=1; back<=ExtBackstep; back++)
              {
               res=HighMapBuffer[shift+back];
               if((res!=0)&&(res<val)) HighMapBuffer[shift+back]=0.0; 
              } 
           }
        }
      if (High[shift]==val) HighMapBuffer[shift]=val; else HighMapBuffer[shift]=0.0;
     }

   // final cutting 
   if (whatlookfor==0)
     {
      lastlow=0;
      lasthigh=0;  
     }
   else
     {
      lastlow=curlow;
      lasthigh=curhigh;
     }
   for (shift=limit;shift>=0;shift--)
     {
      res=0.0;
      switch(whatlookfor)
        {
         case 0: // look for peak or lawn 
            if (lastlow==0 && lasthigh==0)
              {
               if (HighMapBuffer[shift]!=0)
                 {
                  lasthigh=High[shift];
                  lasthighpos=shift;
                  whatlookfor=-1;
                  ZigzagBuffer[shift]=lasthigh;
                  res=1;
                 }
               if (LowMapBuffer[shift]!=0)
                 {
                  lastlow=Low[shift];
                  lastlowpos=shift;
                  whatlookfor=1;
                  ZigzagBuffer[shift]=lastlow;
                  res=1;
                 }
              }
             break;  
         case 1: // look for peak
            if (LowMapBuffer[shift]!=0.0 && LowMapBuffer[shift]<lastlow && HighMapBuffer[shift]==0.0)
              {
               ZigzagBuffer[lastlowpos]=0.0;
               lastlowpos=shift;
               lastlow=LowMapBuffer[shift];
               ZigzagBuffer[shift]=lastlow;
               res=1;
              }
            if (HighMapBuffer[shift]!=0.0 && LowMapBuffer[shift]==0.0)
              {
               lasthigh=HighMapBuffer[shift];
               lasthighpos=shift;
               ZigzagBuffer[shift]=lasthigh;
               whatlookfor=-1;
               res=1;
              }   
            break;               
         case -1: // look for lawn
            if (HighMapBuffer[shift]!=0.0 && HighMapBuffer[shift]>lasthigh && LowMapBuffer[shift]==0.0)
              {
               ZigzagBuffer[lasthighpos]=0.0;
               lasthighpos=shift;
               lasthigh=HighMapBuffer[shift];
               ZigzagBuffer[shift]=lasthigh;
              }
            if (LowMapBuffer[shift]!=0.0 && HighMapBuffer[shift]==0.0)
              {
               lastlow=LowMapBuffer[shift];
               lastlowpos=shift;
               ZigzagBuffer[shift]=lastlow;
               whatlookfor=1;
              }   
            break;               
         default: return; 
        }
     }

   return(0);
  }
//+------------------------------------------------------------------+
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1515 (permalink)  
Old 07-10-2009, 08:22 PM
Junior Member
 
Join Date: Jul 2009
Posts: 1
basalo is on a distinguished road
newbie question

hi all
is it possible to look for a custom indicator on the previous candle? if yes what do i have to do?
basically i want to look for the color of the indicator

Thank you in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1516 (permalink)  
Old 07-10-2009, 11:02 PM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
Quote:
Originally Posted by basalo View Post
hi all
is it possible to look for a custom indicator on the previous candle? if yes what do i have to do?
basically i want to look for the color of the indicator

Thank you in advance
Look in the metaeditor help file at the iCustom function.

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1517 (permalink)  
Old 07-11-2009, 12:26 AM
Junior Member
 
Join Date: Mar 2009
Posts: 4
amitoverseas is on a distinguished road
ATR on chart

Folks,

Would really appreciate if someone could get me custom ATR osc to be displayed on the main chart?


Ta
ams
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1518 (permalink)  
Old 07-11-2009, 10:33 AM
Senior Member
 
Join Date: Apr 2008
Location: Rawalpindi
Posts: 106
arshadFX is on a distinguished road
Exclamation Broker's symbols list

Hi...

I want to know is there any code to get broker's symbol list ?
for example EURUSD, GBPUSD, USDJPY ......
if there is so then please pass this code

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1519 (permalink)  
Old 07-11-2009, 11:20 AM
mladen's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,270
mladen is on a distinguished road
...

Here you go
Usage of ListSymbolTypes parameter :
1 - list forex margin calculation mode symbols
2 - list CFD margin calculation mode symbols
4 - list futures margin calculation mode symbols
8 - list CFD for indices margin calculation mode symbols

or any combination of those numbers (1+2+4+8=15 -> all symbols)
This one simply writes symbols as comment (like on picture)

regards
mladen

Quote:
Originally Posted by arshadFX View Post
Hi...

I want to know is there any code to get broker's symbol list ?
for example EURUSD, GBPUSD, USDJPY ......
if there is so then please pass this code

Thanks
Attached Images
File Type: gif symbols.gif (31.5 KB, 78 views)
Attached Files
File Type: mq4 Symbols.mq4 (3.4 KB, 17 views)

Last edited by mladen; 07-11-2009 at 03:30 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1520 (permalink)  
Old 07-11-2009, 11:35 PM
Junior Member
 
Join Date: Mar 2009
Posts: 4
amitoverseas is on a distinguished road
Hello

Hi there mladen,

I have seen your name all over the forum as you are kind enough to help people mostly.

I would really appreciate if you could post the indicators you have on the chart you posted. Also I am looking for the ATR osc to be displayed on the main chart. Would you please tell me how to do that or provide me that osc as well please?


thanks
ams


Quote:
Originally Posted by mladen View Post
Here you go
Usage of ListSymbolTypes parameter :
1 - list forex margin calculation mode symbols
2 - list CFD margin calculation mode symbols
4 - list futures margin calculation mode symbols
8 - list CFD for indices margin calculation mode symbols

or any combination of those numbers (1+2+4+8=15 -> all symbols)
This one simply writes symbols as comment (like on picture)

regards
mladen
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
forex, histogram, JMASlope, ToR 1.20, ZUP_v1.mq4


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT. The time now is 05:04 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.