MQL4 and MetaTrader 4 - page 160

To post a new topic, please log in or register
Hi, everyone I add 2 color moving average  on QQE indicator. I use iCustom function to get value of line index 0 ~ 2, but the value of of line index 1 ~ 2 is wrong. QQE value is right iCustom(NULL,0,"QQE with Alerts_2MA",5,"",50,1,1,"",0,11,1,3,34,1,1,0,0); 2MA value is wrong iCustom(NULL,0,"QQE...
Hello, if I download the tickdata from duka / eareview but I am using a different broker: will the indicators/oscillators values of my broker become those of duka's? Thanks!
void OnTick() { int res; double MA = iCustom(NULL,0,rsimatest,rsimatest_RSI,0);    //open sell      if(MA<50 && OrdersTotal() <1)       {        res = OrderSend(Symbol(),OP_SELL,1,Bid,3,0,0,"",BIGMACMATT,0,Red);        return;       } //open buy    if(MA>50 && OrdersTotal() <1)       {       res=...
  Indi Average (2)
Hi, I'm trying to code part of an EA that return an indicators average reading.. I've one primitive attempt which works and another which does not, can anyone point me in the right direction to get the broken code into some semblance of sense..         double MACDAVERAGEPOSITIVE,...
New MetaTrader 4 Platform build 1031 The MetaTrader 4 platform update will be released on December 16, 2016. We have fixed some bugs based on crash reports. The update will be available through the LiveUpdate system.
i got a software and the instructions for installation refers only to MT4 build 509 and 600 but as we now have MT5 build 1495 i am unable to download the former versions. can anyone take me through the procedure for installing Ex. 4 files to the latest version of metatrader build 1495?  
  iHighest error 4051 (20   1 2)
Using iHighest I get this error but I honestly do not know what you mean //--- main loop    for(int i = 0; i <= 300; i++)      {                     double val;               bool Pattern = iOpen(Symbol(), PERIOD_CURRENT, 1+i)  > iClose(Symbol(), PERIOD_CURRENT, 1+i)                        &&...
Is there a way to make a function trigger every 10 mins?
hello every one. I am newbie in mql4.  i I have  written a code. But it doesnt work properly in strategy tester.  I want to set a  sell stop at a certain time and after thar delete the pending order. my code is : extern double lot_1=0.4; extern int fasel_pending_1=100; extern int slipage=10; extern...
Hello,   I am having a strange problem. I watch the visual backtest and look at the signals, then when I stop it new signals appear that weren't there during the visual backtest?  The ones that show once I stop are the right signals I want to use!   I have attached a picture showing the new signals...
  Order info by Symbol (15   1 2)
Anyone know of a way to call up order info by symbol? I don't need to call up an exact order just any order with a certain symbol to check the takeprofit point.
I assume that for meta trader, chart will be updated when the real time tick data is arrive. Maybe Meta trader keep write the rate information gathered from the tick in the binary text file to feedback to the chart. However, if the Meta Trader terminal is shut down for many days and  the user...
Hi, i'm writing a custom indicator: because it uses a Heiken Ashi indicator internally, i need to show the Heiken Ashi on the chart on which my indicator is attached on. How can it be done using mql4? Thank you 
int start() { double ExtMapBuffer1[];    SetIndexStyle(0,DRAW_LINE);    SetIndexBuffer(0,ExtMapBuffer1); MathSrand(TimeLocal());     for(int i=0; i<Bars; i++)    {       ExtMapBuffer1[i]= MathRand()%1001;    }       return(0); } Hi friends, i'm starting to learn to program, i have a question...
I am noticing when new orders are open on the same pair that the TakeProfit point for all orders are adjusted to the same point causing some orders to takeprofit at a loss. So how would I get what the current take profit point is for a certain open pair? That way I could evaluated it verse what the...
Hi community, I have this nice non-repainting indicator (coded by mcs "THANKS!") and have edited with my wishes. Everything works fine besides that I can't set all TF the same. For example 60/60/60. The first bar is always the current TF. Can someone help? Thank you dynel14
I am running a large amount of back tests. I have been keeping a few laptops busy most of the time day in and day out. I have found a few issues that hopefully someone here can help me with. I run a EA test with M5 charts for 1 year timeframe and the tests are taking about 20 minutes per setting...
  Broker issues (3)
#Expert Advisors - Open  Hello, Yesterday I discussed one of broker for sign up for new account for testing - and they said me I can't use Expert Advisors, so I immediately said bye! ( I would not like to note that broker name at all ) ( not only I made by myself - no one can't use any type of...
Good morning. I tried to download from the site mt4setup.exe but when you install I find MetaTrader5 instead of version 4. How can I do?
Hi all I want an indicator that draw arrow on main chart when CCI(14) < -100 and MFI(14) < 20 and sum latest three days Volume is greater than monthly Volume Average. thanks again
I wrote this code and put it in my EA's init location. Each time I start the EA, I want to read in this file.    int Handle;   string FileName = "Callouts1.csv";   string OP_Type = "";   string Symb = "";   double Entry;   double StopL;   double FirstNum;   double SecondNum;...
Is it possible to set Comment() text color in an EA? Wackena
Have you ever come across this problem? I am using my MT4 strategy tester to test an EA and after some (about 40-50) runs for a 2 year period (in 30M timeframe) my computer's main hard drive (C drive) fills up !!! I used WinDirStat to find out which program took all that space and I found that MT4...
Hello all, I'm new here (just created this account in order to ask for help with a problem I've been having recently and to which I have found no solution online), so I apologize if I'm writing this on the wrong section of the forum. I'm a regular user with practically no coding skills, and I am...
Hello everyone! I created a simple HeikenAshi pattern and every training I have to insert a horizontal line at the close up and I have to see him in the historic midnight. I can not understand, how can I add a line for each pattern that has already occurred from midnight onwards. Maybe I should use...
//+------------------------------------------------------------------+ //|                                                      MAvsRSI.mq4 | //|                        Copyright 2017, MetaQuotes Software Corp. | //|                                             https://www.mql5.com |...
Hi,  I have some strange issue while using backtester. Here is some code sample:   double ND(double val)   {    return(NormalizeDouble(val, Digits));   } void OnTick()   {    double price=Ask;    double minstoplevel = MarketInfo(Symbol(),MODE_STOPLEVEL)+10;    double...
All; I am testing a robot in Strategy Tester. I set the Max Spread on the robot to 2 pips, and the max slippage to 3 pips. I also have the spread on the tester set to 'Current'. When I run Strategy Tester on the 5 minute EURUSD, I have poor results. When I change the spread on Strategy Tester to '2'...
Trying to figure out how to get random number for use in random lot sizes. Ex: double randNumb = (MathRand()%9)/100; //randmon lot size double LotSize = 0.1 + randNumb;
     double MarginFree =  AccountInfoDouble(ACCOUNT_MARGIN_FREE);      double Margin =  AccountInfoDouble(ACCOUNT_MARGIN);      double MarginCheck = MarginFree / Margin; When I use this I get a division by zero error.