MQL4 and MetaTrader 4 - page 223

  modify stop loss not working  (14   1 2)
Hello,  Im trying to modify long positions on mt4 and im using a for loop to change the stop loss to move it up as the profit values are quite high and if it doesnt reach that value it sometimes ends in loss when it couldve still be very profitable, I dont know what im doing wrong and ive been stuck...
Hi I just started in MT4 and I am trying to back test the EAs that come with MT4. for some reason they only do one trade regardless of the timeframe. Am I doing sth wrong?
Hi,  If I build an expert advisor and install it on my friends computer, is there any way to make the code crypted or similar so that he/she can not just open the code from MT4 and see how the code is writte in MetaEditor i.e. steal my code logic? Thanks
We have received a numberof emails that antivirus products AVG AntiVirus Free and AVG Internet Securitygenerate alerts about MetaTrader 4 Client Terminal being virus-infected. This is a false alarm.Unfortunately the above mentioned antivirus programs interpret crack-defensemechanisms of MetaTrader 4...
Hello, everyone, I was wondering whether someone here could enlighten me how to integrate Shark machine learning library in MT4/MT5. If there could be any demo or examples, I would be very appreciate it. Thank you very much!
Hi People! Here i have a MA Indicator what change the Linecolor in red, green or yellow. For using in a other indicator i try to read out the color State of the Line. I love the smooth behavior of this indicator. Also the yellow State is a perfect hysteresis for my purposes. At the bottom of the...
  Integer division  (2)
int x = 3, y = 6;double z;z = y/x  ------  z = 2z = x/y  ------ z = 0z = (double)x/y ------ z = 0 MQL4 documentation identifies this problem but the trouble is it doesn't say the correct way to get the right answer!! Is the only way to get the right answer to declare x & y as 'double' even though in...
I want to code a loop to close an order (effectively a stoploss). The order should be closed when the price drops below the lowest price (minus 2 pips) of either of the 3 bars immediately before the marker buy order.  I was thinking of using the CopyLow to get a history of the lowest price of an...
Hi, I'm trying to code for a limit criteria to close an order, however the criteria needs only to be relevant when the 4th bars appears following a marker order. I would like to code to assess the characteristics of all bars (already have coded this), subsequent to the 4th bar of an order. I am...
can some one explain to me what exactly the Ordercloseby() function does, am having hard time to code it into my robot. Does it close and order and then opens an opposite one, or...it just closes an order depending on the opposite one. what exactly do the parameters of this function mean???...
I'm trying to pull market data on a EURUSD.s chart. Option 1) MarketInfo(Symbol(),MODE_BID); Option2) string Suffix=StringSubstr(Symbol(),6); Print(Suffix); //gives .s string Pair="EURUSD"+Suffix; MarketInfo(Pair,MODE_BID); Option 1 is working fine. Option 2 is not working, it can't use Pair to...
For some reason the comments in my code are appearing in my Input dialog box in the variable column. (Build 646) eg input string MMValues_S         = "<===== Money Managment Settings =====>";input bool   dynamicLotSize_S   = true;  // Enable for compounding lot sizesinput string Info1_S            =...
Hi everyone, I'm trying to use the iCustom command to take values from an indicator that I do not have access to the source code for. The indicator has a lot of settings, some of which are not numerical. I know that you have to pass the indicator settings to the indicator in iCustom, but I'm...
Hi, im new in coding. This period im studying C, it would be helpfull to know in advance what are the differencies between C and mql4, since Im going to code my own EA and I want have since now an idea of what C can and cannot teach me. Thanks!
[Deleted]
Hello,   i've just  installed my mt4 on w7, before i was using vista. I'm not sure off the version running on vista but on w7 it's version buit 950. the tradefromcsvfile expert advisor  (cf below) is not recognized anymore as an expert. Don't know the reason why it doesn't work anymore. If somebody...
Hi mates, I have a method that can save the current objects of the chart in a file .csv and another one that can read from this .csv and put it on the chart. This second method is called when the user clicks the key "0". When the key is pressed in the current new chart, all the information contained...
I have developed a custom dll on my home PC (Win Xp Pro). The EA with the importeddll runs perfectly. When I try to run it on my server (Win Server 2003), it gives error 126. The settingsin the platforms are identical, I assume there is something different, somethingmay be missing in OS environment...
[Deleted]
Hello, I have an EA that uses 3 ima indicators ma3, ma30 & ma60. The default on the chart is a red line for each. How can I change the defaults so I can get a different line color for each one. I want to do it in the EA using the MQ4 code. I do not want to manually have to change it in the chart...
i need help to select lot of postion and save in array to select biggest lot to martingle double biggestlotbuyOrders()  {      double mark[]={};   for(int i=OrdersTotal()-1;i>=0;i--)                                          {      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))...
Hi All.  I'm trying to setup a backup redundancy for when my EA stops functioning on my PC.  I want to do this by having a second PC in a different location with an EA running and monitoring the primary EA in the first location.  The secondary EA will then kick-in when the primary EA stops...
Up until now, I guess that I have only used integers when using % in my code. double remainder = 100 % 30; works fine double remainder = 100 % 30.1; Compiler reports error '%' - illegal operation use as does double remainder = 100.00 % 30;double remainder = 100 % 30.00; So both values have to...
[Deleted]
  Bobokus Fibs  (2)
I modified a bobokus fib custom indicator to automatically draw the daily, weekly, and monthly fibs on a chart. It is working pretty good. However, I cannot draw yearly fibs. The problem is that there is not a PERIOD_Y1 constant to pass to the period variable int shift = iBarShift(NULL,period...
[Deleted]
Hello, i want to build a simple indicator about my profit-loss analysis... as Select by pos is related to Ticket ID/Order Date... is it possible to create the same one but sort by Closing Date
hi is it possible to save all my open charts and the EA that are running on it . can I save it so that when I open mt4 again I can load them all automatically without having to place each EA on to a chart . also is it possible to transfer these setting to another mt4 platform 
Hi, I'm interested to know if there is way to check in MT 4 via a report or indicator/ea if a trailing stop loss on certain trades was placed or not and at how many points it was set at if so. Thanks in advance for any assistance with this.
I want to stop order by some moths. For example, from Feb to Nov, EA will trade but in Dec and Jan, EA stop trade. I put Stop moths in the array. If buy signal>0 and check to see if it is trade month or not. However, it is not working properly. Can you give me some advices what the problem is? int...
I have a lot of charts on my terminal and each chart has a lot of objects like trendlines and channels. I get very tired of double clicking each object to select it, right clicking it and then selecting Object Properties to bring up the Object Properties dialog box, every time I want to change...
Hi everyone Im searching for an EA for MT4 that lets me set a trailing stop on each individual trade. Im currently using a trailing stop EA which has the basic features I want they are; break even SL after the trade goes a set amount of points in my favor and engage a trailing stop after trade moved
[Deleted]
  Time filter  (17   1 2)
Usually time filter is widely used. For those that need Hours time filter here it is: if (((Hour()>=StartHour && Hour()<EndHour && StartHour<EndHour) || (Hour()>=StartHour || Hour()<EndHour && StartHour>EndHour))) EAActivated= true ; else EAActivated= false ; Can somebody share
Hello again, I need to stop calculating a function because of CPU. I created a BUTTON. TRUE state => I call + dysplay my_function. FALSE state => I hide the dysplayed grapical objects and indications. (but the function is still there and take CPU ressources). How can I stop / kill the function's...