Quantcast
Channel: MQL5: MetaTrader 5 trading, automated systems and strategy testing forum
Viewing all 75046 articles
Browse latest View live

how to solve the problem without problems ??

$
0
0
we are not good at reading the market, but we must be clever
How about you? please your opinion here

My EMA array keeps showing a negative value, is that normal?

$
0
0
Miroslav Popov:

Can you try setting the mode to MODE_EMA.

You have misspelled the therm to MODE_E<A

MY mistake; that was a bad cut and paste.  Below is the code without any variables or misspellings...


EMA5_Handle=iMA(Symbol(),0,5,0,MODE_EMA,PRICE_CLOSE);
EMA5_Handle=iMA(Symbol(),0,10,0,MODE_EMA,PRICE_CLOSE);


   CopyBuffer(EMA5_Handle,MODE_EMA,0,17,EMA5_ARRAY);
   ArraySetAsSeries(EMA5_ARRAY,true);
  
   CopyBuffer(EMA10_Handle,MODE_EMA,0,17,EMA10_ARRAY);
   ArraySetAsSeries(EMA10_ARRAY,true);

Best EA to use

$
0
0

this is best than others

https://www.mql5.com/en/market/product/10093

POWERFUL TRICK ON GBPUSD PAIR

$
0
0
Dua Yong Rew:
what are your statistics on this strategy?
More than 70% accurate 

What our life - the game?

$
0
0

i am not sure about your life but mine is more like this:


Mergin two indicators in EA

$
0
0
Alain Verleyen:
You have to use iCustom().

Hey Alain, thank you for your answer.

Maybe I have expressed myself in a bad way. I know how to get the value from an indicator into my EA, what I need is to get the value from two indicators that are in the same window and with fixed maximum and minimum, into the EA.

In the terminal I can see the two indicators in one window by just dragging the one onto the other, no problem! But how to employ this values in my EA? If I call the indis inside my EA, I get two values, but they are on completely different scales due to the fixed limits. Momentum limits are min 97 and max 102, my custom indi has limits from (-5) to 5. How could I detect a crossing inside my EA?

Im trying with excel to make this work, but for now I'm still puzzled :(


EDIT: I have solved the problem. My formula is: (x - ((102+97)/2)) * 2

Maybe it helps someone someday...

Limitation (Time & user)

$
0
0
biantoro kunarto:
Yes, you can add a limitation to an EA such as Time/date limitation, account number, broker name,..etc

Thank you.

Regards...

Absolute Asset.In EQN Gold added words

$
0
0
Gold: An Absolute Asset.In EQN Gold added words, gold reacts absolute of stocks, to bread-and-butter and political factors and bazaar events.This makes gold the ideal diversifier for a portfolio of stocks. The acumen for this is because of the capricious attributes of apple events.

When you get appropriate down to it, consistently admiration near-term and medium-term movements in the banal bazaar is just about impossible. No one has done so with any success to date and no one has developed any trading arrangement that has done so over the continued haul.

Likewise, no one can adumbrate with authoritativeness the timing and attributes of the next bread-and-butter crisis or conceivably the next agitator attack. All of these kinds of factors appulse the banking markets—including the banal bazaar and gold market—and appropriately allegation to be accounted for. http://www.4eqngold.com

A beauty K_MACD Indicator Went Crazy.If you don't believe in Ghost whatch it.[pic*2][Code]

$
0
0

This is My favorate MACD colored and with point Arrow.

It works well on the first load,buy it went crazy if you change it's time frame.

the code is blow. The arrow I set shoud be 0.01 or -0.01 or be null

but after the change of timeframe It's start to be random num from nowhere.

Like a ghost in my computer.Help me tell me why. I am new if MT5.

I start to use MT4 since last week, I learnd a lot of code, function and start to make Indicator for my own.

This K_MACD is first first coded on mql4, it work well.

Yesterday I know the exitence of MT5. Since there is a new one why use the old.

But new one is not always the best. The flexibility and complecity of MT5 almost make me crazy.

I want to know why the buffer could take data randomlly.


//+------------------------------------------------------------------+

//|                                                       K_MACD.mq4 |
//|                                   Killnight a coder on breadline |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Killnight a coder on breadline"
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_separate_window
#include <MovingAverages.mqh>
//#property indicator_minimum -0.08           //The bottom scaling limit for a separate indicator window
//#property indicator_maximum 0.08          //The top scaling limit for a separate indicator window

input int InpFastEMA=12;   // Fast EMA Period
input int InpSlowEMA=26;   // Slow EMA Period
input int InpSignalSMA=9;  // Signal SMA Period
input ENUM_APPLIED_PRICE InpAppliedPrice=PRICE_CLOSE; // Applied price

#property indicator_buffers 7
#property indicator_plots   4

//--- plot Section

#property indicator_label1  "ZBL"
#property indicator_type1   DRAW_ARROW
#property indicator_color1  clrGreen
#property indicator_style1  STYLE_SOLID
#property indicator_width1  1

#property indicator_label2  "NBL"
#property indicator_type2   DRAW_ARROW
#property indicator_color2  clrRed
#property indicator_style2  STYLE_SOLID
#property indicator_width2  1

#property indicator_label3  "Signal"
#property indicator_type3   DRAW_LINE
#property indicator_color3  clrWhite
#property indicator_style3  STYLE_SOLID
#property indicator_width3  2

#property indicator_label4  "MACD"
#property indicator_type4   DRAW_COLOR_HISTOGRAM
#property indicator_color4  clrRed,0x000046,0x234200,clrGreenYellow
#property indicator_style4  STYLE_SOLID
#property indicator_width4  2




//--- indicator buffers
double                   ExtMacdBuffer[];
double                   ExtSignalBuffer[];
double                   ExtFastMaBuffer[];
double                   ExtSlowMaBuffer[];
double                   ColorBuffer[];
double                   UPBuffer[];
double                   DWBuffer[];

//--- MA handles
int                      ExtFastMaHandle;
int                      ExtSlowMaHandle;
//+---------------------------------------

//clrGreenYellow,C'0,66,35',C'70,0,0',clrRed

bool ExtParameters;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,UPBuffer,INDICATOR_DATA);
   SetIndexBuffer(1,DWBuffer,INDICATOR_DATA);
   SetIndexBuffer(2,ExtSignalBuffer,INDICATOR_DATA);
   SetIndexBuffer(3,ExtMacdBuffer,INDICATOR_DATA);
   SetIndexBuffer(4,ColorBuffer,INDICATOR_COLOR_INDEX);
   SetIndexBuffer(5,ExtFastMaBuffer,INDICATOR_CALCULATIONS);
   SetIndexBuffer(6,ExtSlowMaBuffer,INDICATOR_CALCULATIONS);

   IndicatorSetInteger(INDICATOR_DIGITS,_Digits);

   PlotIndexSetInteger(0,PLOT_ARROW,226);
   PlotIndexSetInteger(1,PLOT_ARROW,225);
   PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0);
   PlotIndexSetDouble(1,PLOT_EMPTY_VALUE,0);
   PlotIndexSetDouble(2,PLOT_EMPTY_VALUE,0);
   PlotIndexSetDouble(3,PLOT_EMPTY_VALUE,0);
  
   IndicatorSetString(INDICATOR_SHORTNAME,"K_MACD("+string(InpFastEMA)+","+string(InpSlowEMA)+","+string(InpSignalSMA)+")");
//--- get MA handles
   ExtFastMaHandle=iMA(NULL,0,InpFastEMA,0,MODE_EMA,InpAppliedPrice);
   ExtSlowMaHandle=iMA(NULL,0,InpSlowEMA,0,MODE_EMA,InpAppliedPrice);
//--- initialization done
//ChartRedraw();
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int getIndexOfColor(int i)
  {


   if(ExtMacdBuffer[i]>0)
     {
      if(ExtMacdBuffer[i-1]<ExtMacdBuffer[i])return(0);//如果左柱<右柱即MACD上升趋势应为亮红否则为暗红
      else return(1);

     }
   else
     {

      if(ExtMacdBuffer[i-1]>ExtMacdBuffer[i]) return(2);
      else return(3);

     }

  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---

//--- check for data
   if(rates_total<InpSignalSMA)
      return(0);
//--- not all data may be calculated
   int calculated=BarsCalculated(ExtFastMaHandle);
   if(calculated<rates_total)
     {
      Print("Not all data of ExtFastMaHandle is calculated (",calculated,"bars ). Error",GetLastError());
      return(0);
     }
   calculated=BarsCalculated(ExtSlowMaHandle);
   if(calculated<rates_total)
     {
      Print("Not all data of ExtSlowMaHandle is calculated (",calculated,"bars ). Error",GetLastError());
      return(0);
     }
//--- we can copy not all data
   int to_copy;
   if(prev_calculated>rates_total || prev_calculated<0) to_copy=rates_total;
   else
     {
      to_copy=rates_total-prev_calculated;
      if(prev_calculated>0) to_copy++;
     }
//--- get Fast EMA buffer
   if(IsStopped()) return(0); //Checking for stop flag

   if(CopyBuffer(ExtFastMaHandle,0,0,to_copy,ExtFastMaBuffer)<=0)
     {
      Print("Getting fast EMA is failed! Error",GetLastError());
      return(0);
     }
//--- get SlowSMA buffer
   if(IsStopped()) return(0); //Checking for stop flag
   if(CopyBuffer(ExtSlowMaHandle,0,0,to_copy,ExtSlowMaBuffer)<=0)
     {
      Print("Getting slow SMA is failed! Error",GetLastError());
      return(0);
     }

   int limit;
   if(prev_calculated==0)
      limit=0;
   else limit=prev_calculated-1;
//--------------------------------------------------------------------  
//--- calculate MACD
   for(int i=limit;i<rates_total && !IsStopped();i++)
      ExtMacdBuffer[i]=ExtFastMaBuffer[i]-ExtSlowMaBuffer[i];
//--- calculate Signal
   SimpleMAOnBuffer(rates_total,prev_calculated,0,InpSignalSMA,ExtMacdBuffer,ExtSignalBuffer);

//macd填色

   for(int i=limit+1;i<rates_total ;i++)
     {
      ColorBuffer[i]=getIndexOfColor(i);
     }

//---------------------------------------------------
   for(int i=limit+1;i<rates_total ;i++)
     {
      if(ExtMacdBuffer[i]>0)
        {
         if(ExtMacdBuffer[i-1]<ExtMacdBuffer[i] && close[i-1]>close[i])
           {
            UPBuffer[i]=-0.001;

           }
        }
      else
        {
         if(ExtMacdBuffer[i-1]>ExtMacdBuffer[i] && close[i-1]<close[i])
           {
            DWBuffer[i]=+0.001;
           }
        }
     }

//--- OnCalculate done. Return new prev_calculated.
   return(rates_total);



  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
//---

  }
//+------------------------------------------------------------------+
//| ChartEvent function                                              |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
//---

  }
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0);
   PlotIndexSetDouble(1,PLOT_EMPTY_VALUE,0);
   PlotIndexSetDouble(2,PLOT_EMPTY_VALUE,0);
   PlotIndexSetDouble(3,PLOT_EMPTY_VALUE,0);  

   Print(__FUNCTION__,"_Uninitalization reason code = ",reason);

}

learn latest fifa 15 news on ffifa15coins4u.com

$
0
0

Apart from this in terms of video games several huge corporations ar smitten by the foremost extremely compact and equipped recreation system that is well style and well-suited for all the machinery systems used for recreation and its progressing stage. One such system is that the X box developed by one such illustrious that is MICROSOFT. From the u.  s. itself the X box was launched and was sold  with numerous its elements and excluding this the second console coming back with music, streaming multimedia system contents services and presently with its most latest fifa 15 ios coins one with design controller integrated with set high box and satellite based mostly channels.


For constant device and recreation system FiFa 15 Games ar providing fifa 15 ps coins that causes you to to use once more and once more as you'll get it from any FIFA 15 web site with simple and fast delivery with the merchandise starting from 100K to 5000K.


These systems ar currently developing for the most recent product and technology for the future and most wanted ones and for constant fifa 16 coins ar best applicable for Fifa 15 coins IOS that's integrated software package supporting all the apple devices like iPod, iPad, Google's golem and far additional. The product additionally vary from 100k to 5000k with all of your order data. more determination and cheap fifa 15 coins at Fifa15coins4u.com.

Scripts: FX5_FiboSpiralScript

$
0
0
I love this tool. Added it to my primary trading tool set.

EA'S NOT WORKING ON MT4, PLEASE HELP

$
0
0

I am using the forex.com as my acct. I am also using the default expert advisor and up until about 2 weeks ago I was getting emails regularly from my signals, but all of a sudden I don't get emails anymore . The journal says : 2015.06.30 22:50:43.708    Mail: error connecting to mail.gmx.com, and I've tried yahoo comcast emails as well and none of them connect at all. My original email was the Yahoo.com email, but absolutely none are working. Can anyone tell me what is wrong?


Thank you.

Zeyda

where to find hedgeterminalapi.ex5?

$
0
0
db491:

Hallo,

i have the same errore, check this link...

https://www.mql5.com/en/market/product/5096 

Thanks a lot, solved!

Max Number of Running Systems on MT4

$
0
0
David Raine:
Yes, the number 32 makes sense, assuming the the operating system is 32-bit.
LOL...that has nothing to do. 32 is a limit imposed by Metaquotes for all systems (32 or 64 bits). It could be 18 or 47.

Discussion of article "How to Subscribe to Trading Signals"

$
0
0

hello

is there any way i can subscribe to signal in mql5 every month without need to re subscribe? i mean subscribing to signal by recurring automatically every month?

if this features is not available please add this recurring subscription features. 

because i have experience a situation where the signal provider have open a position and then the subscription ends. by the time i resubscribe the signal the position is already close and when the mt4 sync the position, the position is already in losing

so if automatic subscription is offerred my mql5, then this kind of problem will be settle.

FilesExist - check if a file exists in web folder

convert

$
0
0
calvindmello:
can any one please convert to EA it is very helpful to earn good profit  
Please don't post decompiled code again. It's strictly forbidden and next time you will receive a ban.

Function to check Introducer Broker (IB) Code

$
0
0

Dear All,

MQL4 has function to check MT4 account number with this command

int  AccountNumber(); it will return MT4 account number

Sometimes specified MT4 account number was registered under specified Introducer Broker (IB) Code

My question: Is there any function for checking the Introducer Broker (IB) Code? the function should return the number to which specified MT4 account number was registered with.

For example, my MT4 account number was 222333 and it was registered under IB code 5678.

Is there any function that will return 5678 ?

If there is no function like that, it would be appreciated if MetaQuotes can provide it, as it will be very useful for EA developer.

Thank you

how to read a cell from excel

$
0
0

i need to read values in a open excel worksheet...

can you help me?

thanks

help,Backup iPhone Contact

$
0
0
MarthaPenniman:
Besides using iTunes, third party tools are also good choice for you. You can use iOS Transfer which is useful to backup iPhone contacts.
Viewing all 75046 articles
Browse latest View live


Latest Images