Download MetaTrader 5

MQL4 and MetaTrader 4 - page 84

To post a new topic, please log in or register
Hello I have an array of arrays of ints. I want to access a particular sub-array but compiler says: "Invalid array access". What am I doing wrong? Please Note: I do NOT want to access individual elements of the sub-array int            ...
Hi, Gurus: Due to the Bid Price horizontal label Coveres the Ask Price label sometimes if the spread of the instant market quotes is too small and it covered by the Ask Price is really annoying! I know the configuration of the MT4 terminal give our users one option : Select the Ask Price Horizontal...
We want to run a script overnight and I have got the terminal.exe to run via a schedule to open the relevant chart and then run the script.  This script collates the require variables, but cannot place the orders.  It reports an Uninit 0 error. If I run the script manually, it works normally.  And...
Hi, Gurus: Does anybody know how to get a specific Order's Ticket No. through one click in order list  of the terminal trading tab? Current situations: 1. Double click one of the order list in trading tab & pop out a dialog window (Yes! The Interface for the operations of  deleting / modifying /...
  mt4 - indicator - Levels (13   1 2)
Hi, I am interesting about 'Indicator Levels' so I need to get some advice before I started. Which 'Object' would be better for it? I want to write 'Level Prices Description' like below.   Really any good reply would be better. Thanks. 
Hi, how I can schedule one script ? I will that the script start automatically on 14:35 PM It is possible ? We must buy a external plugin for MT4 ? Thanks for the Anwers, bye Guido 
Hey guys.. I have an EA that wanna change it to what i want, but there are some issues that i can't solve them... 1. Another problem in my ea is that it does not see my condition for starting an order (line 66 and 72) and it open trade on open[0], beside when for ex, it open a buy position and after...
Hi, I try to use 'ChartSetSymbolPeriod' for my indicator, but this indicator slow down my MT4 platform when I try to use it with another Expert Advisors. //+------------------------------------------------------------------+//|                                       ChangeSymbol Indicator.mq4...
Hi gurus, Recently I often find that many demo accounts can be identified as a live account (IsDemo() gives false on demo accounts). Can you tell me something about this? Why is it, and is it possible to avoid it? Thanks 
Hey there! So I've been trying for the past few days to get a custom indicator working within an EA. Its the PZ Lopez Trend. I'm also using a web based coding environment called FxDreema to actually create the code. I'm noticing though that when I have set the EA on a chart, it makes maybe two...
Hi All, i created a simple script, which cover closing unrealized pending orders when new candle started, but it doesn´t work. Can you please help me with this? I need to solve this problem. Thanks for any help :-) int Objem1 = Volume[0];...
I have written a simple code to calculate the average of the past ten days, weeks, and months and placed it in OnInit(), however, when run, it loops indefinitely. Can someone please tell me what I did wrong...   Here's the code:   int OnInit()   {     double Avg=0.0;     printf("I'm going to find...
Hi Guys,     I wanted to check with you guys if you can help me with a function that I can call to check if previous 10 candles is not touching my SMA(18) as I want to use it as another filter for the EA that I am working on something like below:    
Hello to the experts, I tried to use the shortname function with a custom indicator, but nothing seems to appear in the chart window. Then I tried the for example MACD default codes, implemented in the INIT() area: IndicatorShortName("MACD("+IntegerToString(InpFastEMA)+"...
You may have already noticed that the most interesting things now happen mainly on the MQL5.community. MQL4.com is about to be switched to the data archive mode. Only Book and Documentation sections will remain on MQL4.com by November. Besides, the entire MQL4.com Forum content is to be transferred...
Hello, is there a simple way for an empty default value on arrays (of objectpointers) ? signature: void funcsname(...., clsName* &ArrayOfObjectPointers[] = ???) {} // *NULL[] no surprise, this is not working. But is there a usefull "ZeroPointer" ? Thanks
I'm trying to copy a file on my C: drive from mql4.  I cannot use the inbuilt mql4 FileCopy command as the file I want to copy is not within the metatrader folders. Here is my test code, but it's not working.  Any help would be much appreciated?   #import "shell32.dll"  int ShellExecuteW(int hwnd...
Hello, I would like to write some code for Indicator "Candle CountDown" but I need some help. I know Period() - Returns timeframe of the current chart. But I would like to use "Period()" like "PERIOD_M15" in the M1 TimeFrame Chart. CandleCountDown = ( Period() * 60 ) - ( TimeCurrent() - Time[0] );...
  No connection (2)
Anyone else having trouble?  I have a demo account and I can't seem to get a connection.  Any help is appreciated.   Thanks! 
Hi all, I need your help with the following First of all, I want to know if the calculations made in the language can be so accurate that results get to work with all these decimals. Now I explain what I try. I need to make a division for a number containing many decimals, 106 to be exact. the...
Hi Coders! Do you know the HT indicator? Other name is: Hard Trend indicator or HT Multi indicator. It's a multitimeframe tool. The input parameters of the indicator are: ExtHT1Period = 100 - means M5 timeframe ExtHT2Period = 300 - means M15 timeframe ExtHT3Period = 600 - means M30 timeframe...
extern double lots =  0.01;extern int takeprofit = 30;extern int magic1 = 302;extern int slippage = 3;extern double lotfactor = 0.50;extern int totalORders = 8;extern int EnterHour = (4);//+------------------------------------------------------------------+//| Expert initialization...
  IsConnected() (38   1 2 3 4)
Can someone explain to me how IsConnected() can work after int start() if anything is written after int start() is execute only after a new tick How can the EA get to it at all thanks
Hi guys, I wrote this function(below) and when I call it in star() the values remain the same and are not updated bool checkMyTrend()   {      double Maa1 = iMA(Symbol(),0,periodM1,0,MODE_SMA, PRICE_CLOSE,shiftM1);      double Maa2 = iMA(Symbol(),0,periodM2,0,MODE_SMA, PRICE_CLOSE...
how can i find datetime and price of this point, 
I have been testing an EA using "Daily" period for July 2016. My EA needs the current market price in order to make buy/sell decisions and it works that price out by signing Bid to a variable after using RefreshRates(). In addition, my EA takes the high and low of the last hourly bar (after working...
Hi all. Plz  explain to me if this code should work. I want to use ZigZag to manage SL. In order that i look for 3 last value>0 of the indicator. Than I want to use this 3 values in further conditions. Will this 3 val change in every thick? (I copied essential part of code, because whole thing has...
Hi, The values from the lines are in buffers. How can I calulate and draw an average line from each line?
Hi everyone, I'd like to add a MA 9 on a MACD indicator. What kind of code line should I add in the indicator ? Thanx a lot. Euphorya
Hi, I'm trying to do an if condition but it doesn't work. It always results in condition as candle1=1 even if for each timer I change this variable. Where I'm going wrong? Thanks in advance Regards int candle1=0;int OnInit() {EventSetTimer(Timer);//--- return(INIT_SUCCEEDED); }void OnTimer()...