MQL4 and MetaTrader 4 - page 455

Hi all, could you explain why it's wrong this way to recall the orders?  Thank you! total = OrdersTotal();     for(cnt=0;cnt<=total;cnt++)     {         OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);     if (OrderSymbol()==Symbol() )              {        ...      
Hi all, I have error 4051 with this code, could you help me? Thank you! I verified by printing that the int "Old_Ticket" is correct, so I don't understand why it returns 4051 error. if (...)    {    int Old_Ticket = StringSubstr(OrderComment(),StringLen(OrderComment())-8,8) ;...
Hi I set up a Linux Ubuntu VPS server, where I installed several of my brokers MT4 platforms, using wine. However, the Market/ products tab at the bottom in MT4 has no Markets tab! So I cant activate and use my EA's that I have purchased. Please help!
  Help on Code  (4)
Hi does somebody could help me? I want the EA to set a Pending Sell Stop Order when I open manually a Buy Market Order, why this code isnt working?  // External extern double LotSize = 0.1; extern double StopLoss = 150; extern double TakeProfit = 120; extern double PendingPips = 30; extern int...
Is It possible check 99% of quality for backtest on hitorical data?
  historical data  (2)
<b>Market:</b> You have activated the product <a href="https://www.mql5.com/en/market/product/15750" target="_blank">RSI Breakout Dashboard</a>, 8 of 10 activations left. (See <a href="https://www.mql5.com/en/market/rules" target="_blank">Rules</a>, IV.10 and IV.11)
[Help] I created Custom RSI indicator manually but it's don't work. How to calculate Average Gains/Loses?? https://en.wikipedia.org/wiki/Relative_strength_index#Calculation I'm using MQL4. There's no built-in function for Average Gains/Loses. If you know how to code that average gains/loses, please...
Hello to All:  How can I get alert signals when the RSI hits a number, let say 30, for one or many currency pairs?  Must I specify the timeframe?  If yes, how?  It's probably easy, I just don't know how to do it?    Sincerely, Garcia Fong 
Hi, I'm having issue with adding default indicators like ATR, CCI, MACD etc. I found that the indicator is marked with grey symbol. I cannot won't add even i treid to add by clicking Tools>Indicators>Custom. There is nothing shows there Also, when I tried to click metaeditor this error appears.  I...
[Deleted]
Hello, I am trying to write a indicator to draw high and low of Last/Current Month andLast/Current Year. With the help of the members here I was able to get the indicatorworking however there are couple of things I would like to get help with: 1. All the lines are drawn RED even though I mentioned...
Each time I make backtest, a plenty of gigabytes destroy my hd; any trick?
Hi friends I wonder how could it be possible for "MarketInfo(_Symbol,MODE_TICKVALUE)" to be equal to zero? I've written the code below to calculate the broker's commission in point but sometime it takes the zero divide error !    double commission_in_point=((commission_per_lot)/MarketInfo(_Symbol...
Hello, I wonder if it is possible to use EA to open positions at the same time in two different MT terminals (two different brokers), that is, opening poistion in one account can automatically open another position in the seccond account?  Please kindly advise  Thanks. 
  Margin % mql4  (3)
How do i get the value of margin percentage(at symbol properties window) in mql4 code?
Is It possible install data from dukacospy without paying tickstory in mt4? Someone can help me with this? Is It necessary a script?
extern int PeriodoEMARapida = 5;extern int PeriodoEMALenta = 21;int MaximoDeOrdenes = 0;int BarsCount = 0;//+------------------------------------------------------------------+//| Expert initialization function...
Hi I am a newbie to the forex coding...   I have been trying to modify the open price of an order when the pre defined conditions are met. But while executing the order modify function, it is returning false and the error code is showing as 1.   I have observed that order open price and modified...
I have a problem in storing my newer files: when I look at the file I am trying to place in storage it is different but the old file has a  > revision number: If I 1/. keep a copy of the files im trying to save as xFileName for FileName (file) 2/. Then delete the files I want to store 3/. Update...
Another one I cannot find info on... Anyone have a function to add the millisecond count to the tick struct? I made one that uses to pc clock instead of broker time, but this is obviously not accurate (broker time diff/network latency)... Any ideas? here's what I have so far... #property...
Hi All, In MetaTrader there are several DEFAULT indicators, that were added along with installation of platform, that I would like to delete, particularly but not only Oscillators which I comment them as extremely unreliable. In one moment they show one trend direction - possibility to enter...
Hello Trying out code from https://www.mql5.com/en/forum/130611/3340415#comment_3340415 as I have plotted a series of HLINEs and want to change the font of the descriptions of each:    if(ObjectSetText(_lineName, "What you want to call your line", 8, "Arial", Magenta))...
Hello everyone, I am not sure how to achieve this ,but should be possible. void ControlPanels(){   string AControlPanel="P",        BControlPanel="1",        CControlPanel="P2",       DControlPanel="P3",        EControlPanel="P4",       FControlPanel="P5",         GControlPanel="P6",...
Hello, here is my code why facing error 131 , Do some one help me... Chaiya if().. {         buy_TP=0;         if(StopLoss_In_PIP>0)            buy_SL=Ask-StopLoss_In_PIP*pip;         else buy_SL=0;         buy_TP=NormalizePrice(buy_TP);         buy_SL=NormalizePrice(buy_SL);         //...
Hello All, I'm fairly new to all of this, so I was wondering if there's a way I can add time inputs so that I can leave automatic trading turned on, but the EA will only place trades during certain hours (i.e. between 3 AM and 7 AM). Not sure if it matters, but I'm using MT4 and MQL4. Thank you in
Hi all. I am trying to extract values from an indicator (assume the name is "ABC_Indicator") that has several input values. I have source code of the indicator. Hence I use the iCustom function to create the following function to extract the buffer values ,as follows....
  EA maybe wrong?  (2)
hi eveyone i recently develope a new EA but is not working. Could anyone help me to find out whats wrong on my code please? P.s. if need it i could provide more information of what is the strategy wich i want to code 
  MT4 Library  (2)
hello my latest research require other pairs data for the calculation of the current pair, I wrote some code but my script are slow and sometimes freezes the MT4. is there any library that can solve my problem? I know MT5 is the right solution, but my broker is still on MT4
Guys my first EA doesn't open any sell order.. only buy.. can you help me ?  double Lots=1;double SL=0;double TP=0;int ticket=0;extern int MagicNumber=10056;extern int StopL=20;extern int TakeP=80;extern bool Compounding=true;extern double Rischio=2.0;extern int BegTrade=8;extern int...
Hey guys, Need a little help. Still learning on coding. So i'm trying to create an indicator. but i have a problem. i have tried to google for answer but can't find it. hope someone here does know. i use the GVGet and GVSet function so will get a better picture //Ex.(iOpen(NULL,PERIOD_H1,0)<iMA(NULL...
[Deleted]
  custom indicator editing  (12   1 2)
Hello to you all ! I am in the middle of developing a trading strategy that uses this wonderful MT4 platform. I am by no stretch of the imagination any type of programmer but can understand a little about the basic meta-editor. I have a question that I am hoping you may be able to help me with. I...