MQL4 and MetaTrader 4 - page 452

Hi Guys, I'm testing my EA and I'm getting always the error 138 each time I run OrderSend function. I edited the EA in order to just call OrderSend on each onTick event: RefreshRates();       int test=OrderSend(_CROSS,OP_BUY,0.01,Ask,5,0,0,"",0,0,clrGreen);    return; In the code I only declare...
Hi everybody, i have tried to fix this problem during the last days, but i really can't find where the mistake is. i just want my EA to close an order when a specific condition is true, but it is triggered right after i open it. i have read and tried several proposal from this forum, but none i have...
[Deleted]
To dear MT4 related department and all readers to this post, Can I add or have any extra indicator in my MT4 mobile? (Android) For example the named indicator which is inside desktop platform of MT4 always... Thanks for your kind and great help, Zeno
[Deleted]
  Get Open Price  (11   1 2)
I am trying to get the open price of the H1 6:00GMT bar. I can't for the life of me figure it out. Please advise. TimeFreedom
Hi all, I've been working on an EA that determines trend highs/lows according to a set of conditions. What I'd now like to do is confirm the cumulative buying or selling pressure on the current timeframe and be able to detect the same on the higher timeframe(s) (using iCustom) to get some...
Hi there, I have an EA that determines trend and at certain points, it draws a row of dots above (short) or below (long) pullbacks in the trend. At the close of each bar, if the trend is maintained, another dot is added to the end of the row of dots at the last price level. If there is a subsequent
  Historical data  (52   1 2 3 4 5 6)
Hi. I downloaded historical data from histdata.com. I used a script to convert m1 to all ohters timeframe. I realized that sometimes difference of levels price goes aroung to 15 points or more if I compare with others brokers. Is there a way to get hitorical data with more precision? I´m looking for...
Hi all - Happy New Year! I'm wondering what the best practice would be when adding the following content to an indicator for an email alert.  My concern is related to processing speed as I will have about 20 charts running, each loaded with multiple indicators that will be sending email alerts. Is...
Hi I have a question. Can mt4 terminal connects to two different broker quotes at the same time? If it is possible does anyone knows how to do it? Is there is a mql4 function I can use in expert adviser to connect to different broker quotes? Thx in advance
Hi, in my EA, in the tester all works perfectly, but in the real mode, the EA buys and sell regularly, but when it has to modify a SL or TP, that is in many of my functions...it says "error #4109 trades is not allowed in the expert properties". I have checked also in Tools -> Options -> Experts...
Hi guys, I have to calculate the final target price (and stop loss) using the pips. I mean:  Suppose to be in EURUSD, and the price is: 1.223 , I have to add 25 pips. I also have to implement this formula for all the possible crosses so I think I have to manage some digits checks... Can you help me...
Hello, I just set up a VPS through MT4 (https://www.metatrader4.com/en/trading-platform/vps) and synced it with an Oanda practice account. The MT4 platform Market Watch time and the VPS Details (CPU, Memory, Disk and Journal entries) times are different by one hour. Which time should I care about if...
Hi Guys, I have an EA that works properly on EURUSD... Now I want it to work on others 10 different cross... What is the best practice in this case ? Should I have to implement a loop on each cross ? Thanks to support!
void OnStart () { int TrailingStop= 50 ; //--- modifies Stop Loss price for buy order №12345 if (TrailingStop> 0 ) { OrderSelect ( 12345 , SELECT_BY_TICKET ); if ( Bid - OrderOpenPrice ()> Point *TrailingStop) { if ( OrderStopLoss ()< Bid - Point *TrailingStop)
I'm trying to create a EA for the attached indi, and even if it turns out unprofitable / unreliable - I REALLY need to understand what I've been doing wrong at this point. Sorry in advance for my coding style - complete noob here :-) The EA will only acknowledge sell signals for some reason (Buffer...
How to get high of a certain time period    I want to get the high for e.g time of my forex broker from 00:00:00 to 00:02:00 I want get the iHighest for the time period of 00:00:00 to 00:02:00 for Today   How do I achieve it , sorry for asking and thanks for helping !  
i have tried everything from resintalling the platform and asking my broker to fix the problem, but all in vain can someone help me fix this, i cant even download the program i bought as there is no download option on the platform coming up
Hi Guys, I'm quite new to Mql4 coding language and my team asked me to use ADX on H4 timeframe in order to identify the trend... How can I do this? Thanks to support! Dario from Italy
Hi Guys, I'm working on a EA and I need to check if the Bollinger Bands has crossed in the last X Candle of the specified timeframe... How can I do it ? Should I have to implement a loop where "for X times" calculates the bands and check if the value crossed? Thanks to support !
Hi, For every symbol in MT4 I use a different traded lot size defined in different chart windows, as shown below: How can I access from a script to this traded lot size defined in a selected chart ?
Hi all, is there a way to clear an Excel sheet? I'm developing my on Excel sheet to monitor my positions. I'm searching between the File functions but I don't find it. Thank you!
In mq4 iTime("USDCHF",PERIOD_H1,0) and  how get time for "USDCHF",Period H1, and Bar 0 in Mq5? Thanks
Hi All, I am trying to install MT4 on a new Mac PC and I am encountering problems and please bear with me if this issue has been discussed previously. I have installed PlayonMac and the Wine as advised on the Mac OS instructions. On the PlayonMac Menu under File/Install I am able to search and then...
  SL & TP  (3)
Hi, one question, is it possible to delete a TP or SL once added by script? I have also a custom function of OrderModify...but with parameters 0,0 it doesn't seem to work
//+------------------------------------------------------------------+ //|                                                           HM.mq4 | //|                        Copyright 2017, MetaQuotes Software Corp. | //|                                             https://www.mql5.com |...
Hello friends :-) I  need some help regarding comments in mql4.  below is my code If (condition1) { Comment(abc) } If (condition2) { Comment(xyz) } The exact problem is if both condition is true at same time , i get only only 1 comment in upper left corner.. I need both comments in 2 lines Please...
Since latest mt4 update, when I compile my EA I am getting the 'i' - undeclared identifier error but cannot see which part of this code is causing it: void CloseOrderSell(){    if ((Ask-Bid) <= MaxSpread*PipValue*Point){    int orderstotal = OrdersTotal();    int orders = 0;    int...
  write to file  (2)
I am trying to get a simple script to write the values of the technical indicators to a text file but I do not get the right values.  The output file dates are integers void OnStart(){   int file_handle=FileOpen("h1.csv",FILE_READ|FILE_WRITE|FILE_CSV);      double   macd_buff[]; // array of...
I'd like to return my custom Candle class (inheriting from CObject) from a function. The compiler will complain: "object of 'Candle' cannot be returned, copy constructor 'Candle::Candle(const Candle &)' not found. How can I implement this copy constructor if my class has the following constructor:...
On my VPS I have around 120 ms but when I click on the objecg in the bottom right corner to see my ping, there is usually an option for 100 ms. I click on it and it changes, but then I check later and it has automatically switched back to the default. This vps the ping is no problem, but I have...