MQL4 and MetaTrader 4 - page 25

To post a new topic, please log in or register
   EA on the local computer can trade, I use the VPS after the club's official website, but can't deal, display an error "trade operations not allowed by Settings", and why?
Hello can someone help me.I just download two indicators on my PC. I like them and I want to know is their a way to transfer them to my mt4 account on my iphone and android cellphone.
If yes, How can i get hold  of that unopened-chart's id?  I want to  apply ChartRedraw() on that chart. SO i need it's id. P.S: pure MQL solutions proffered, but if you suggest DLLs, please explain how to efficiently use them. Things mustn't slow down.
I want to know total profit of open orders (BUY position + SELL position) I also want to include swap + comission. I don't want to use AccountProfit, so I tried to calculate total (BUY+SELL orders). I coded below but when I check with Print(Total_profit), the value is different from MT4 current...
Please help. I am trying to get this into an array I can work with in mql4. No luck so far. [{"orderid":291,"symbol":"GBPNZD","type":"sellstop","price":"1.72","sl":"1.7320","tp":"1.682","ts":100,"expiry":"0000-00-00","status":"pending"},{"orderid":292,"symbol":"GBPNZD","type":"buylimit","price":"1...
With the following code, using the variable "period" (which can become PERIOD_M5, PERIOD_M1, PERIOD_H1) and the variable "long" (various integers) c = NormalizeDouble (iClose (NULL, period, length), Digits); if they were set to PERIOD_H1 and 4, I was sure I would have obtained the closing price of...
  Smtp gmx mt4 (2)
I have enabled smtp access in settings of gmx. However I get test message failed. Is this the correct configuration for gmx mt4 smtp settings? Also, On the gmx setting page where can I find "Send and receive emails via external program"?
I've created a dll that sends email with/without attachment to gmail For sure you can use it with hotmail/yahooetc. Setup Copy the dll to the MetaTrader_Path/Experts/Libraries folder. Copy the xpMail script to MetaTrader_Path/Experts/Scripts folder. These are the xpMail inputs: ServerFor gmail we...
Hi everyone I'm having trouble with my code specifically when the moving average goes above the upper band of the Bollinger band I want it to execute a buy order but it seems like it will only send a buy order if is above the band or if it is above the moving average regardless of the other...
I could not get bbwidthBuffer[i] drawn by the terminal. It would show a blank indicator window beneath the price chart. What is wrong with my coding? Counted_bars=IndicatorCounted();    i=Bars-Counted_bars-1;    while(i>=0)    {       bbwidthBuffer[i]=(iBands(NULL,PERIOD_CURRENT,bb_period,2,0...
hi where i can download MetaTrader 4 Client Terminal Build 432 file ? i need the file for runing testing tick story
trailing stop which activates after 20 pints of profit and has to shift every 10 pips but I kicked something Where i do mistake ? //+------------------------------------------------------------------+ //|                                                         od17.mq4 | //|...
What I want to do is to create a trendline with angle based on 2 anchor points and then find the angle using ObjectGetDouble() so it can help me do various trading tasks such as finding chart patterns. See the code below : // OnTick() event handler                void OnInit() {     // Finding 1st...
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...
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!
F2T
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...
Hello, Can anyone explain me or have some solution for this. I am coding this app in c#. I loaded EA manually, make all to work, then i saved template file manually too, so i have template that works. I have EA that is loaded when i call ChartOpen() function, and after that i call template file with...
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...