MQL4 and MetaTrader 4 - page 470

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...
I have a couple different EA's that I designed.  But the programmer I used just closed his business and doesn't take coding jobs anymore. I would like to make a simple modification to all of the ea's.  Basically, I want to add the function that if the current Heiken Ashi candle on the chart is...
Hi, I make this simple code to display arrow on chart : canvas.CreateBitmap(0,0, "arrow01", Time[0], High[0], 50, 50, COLOR_FORMAT_ARGB_RAW); canvas.LoadFromFile("ObjBuy.bmp"); canvas.Update(); The arrow01 object display correctly. For having two arrows on my chart, I use this code : canvas...
class Child {   Parent *parent;      public:   void setParent(Parent *p) { parent = p; };      };class Parent{   Child *child;      public:      Parent()      {         child = new Child();         child.setParent(this); // << Can we do something like this?      }      ~Parent();};   I need to...
  #property  (3)
Hi I want put my ea to mql market .but , i have this error  (EX4 file must be compiled using #property strict directive) I've added this code at the beginning of EA #property version     "1" #property description "my description" #property description my description" #property description "my...
Hi , I recently started trading in forex , i had worked with mt5 , and today i started working with mt4 , and I noticed a “charges” fee in my deals that made all my deals negative in profit , can you help me to understand what is this part for ?
Hello everyone, I made an indicator that counts the number of pips and the profit from entry. I found code to make a toggle button, and I incorporated that into the indicator to toggle the alert On/Off. When I place the indicator on a chart, the alert is off, and that is actually the case, so that...
I'm not a coder but I hope I'm giving enough info here for one of you MT4 geniuses to answer! I have a custom EA which was designed according to a set of trading rules and formulas.   When I run it through strategy tester, the trailing stop seems to work properly.   But in my demo account it's not...
[Deleted]
I've read a few of the articles about Genetic Algorithms in optimization, and I've read that GA's may have been built into MT4. Does anyonehave any information on this? Does MT4 (build 209) use Genetic algorithms in optimization? Thanks Nick
Hey, I have written the following code that describes a pin bar and a subsequent bar that closes above the pin bar to confirm it, I would like to control the EA taking these trades by having a horinzontal line on the chart named "trigger" that I can manually move to support and resistance levels. I...
I have an EA that opens BUY and SELL orders with a stoploss and takeprofit based on certain conditions. However, when the moving average turns positive or negative over a certain number of bars, I want to close the order. When I do this, I keep getting error code 138 on the OrderClose. Does anyone...
Hi there, I'd like to create an indicator that runs on a different timeframe to the chart on which it is applied. This is so I can compare certain results from a slower timeframe against those of the primary chart's timeframe. The indicator I have in mind (an indicator version of an EA I have...