Download MetaTrader 5

MQL4 and MetaTrader 4 - page 78

To post a new topic, please log in or register
Hi, We can get highest / lowest value of last Depth bar using (similar to MT4 Zigzag indicator) :  double theHighest = high[iHighest(NULL,0,MODE_HIGH,Depth,i)];double theLowest  = low[iLowest(NULL,0,MODE_LOW,Depth,i)]; But how can we get the highest/lowest of the CLOSE price of each bar in the last...
Hi guys, How can I suspend ontick OrderModify if my condition it's true?  My EA place stop orders and modify it on every tick. If an order entry on market I wish to delete the other ones, and that happen, but maybe ontick OrderModify seems to create other pending orders and I can't suspend ontick...
Hi everyone, it will be great if someone could help me to solve this problem, I  have this partition in my code : int T1, T2, T3; int Ticket = 0; double OC = 0; double E1,E2,E3  StopLossSell, StopLossBuy, TakeProfitBuy , TakeProfitSell; // All these variables are defined previously // in the code I...
Hello, Is there a way of calculating an average balance over the past lets say 100 trades. My EA adjusts the ammount of lots to be traded based on the current balance (AccountBalance()) and after a big win the number of lots traded increases quite a bit. I want to keep the lots being traded at an...
I started a test in visual mode and a template with the same name of the EA is set on the chart. Then I get this message 2017.01.28 02:31:27.176    VPC EURUSD,H1: array out of range in 'VPC.mq4' (121,33) 2017.01.28 02:31:27.176    VPC EURUSD,H1: global initialization failed followed by a similar...
Actually I run MT4 using Wine on my Mac - but it's no good as EAs don't all work and ofcourse it needs to be up 24/7. So instead of buying a "cheap" standalone PC for MT4 (at around 300$) I wonder if it is possible to install and run MT4 on aQNAP NAS system. Is anyone doing this or has experience in...
Hi guys, I use MT on a Mac running OSX Sierra - I use PlayonMac and Wine. MT4 itself runs perfectly - only if I install any EA theyre not running. I copy the EA in the experts directory and restart Wine - then the EA shows up in the Navigator and I can tell to activate it for the chart. The EAs...
I am new to programming and struggling with my first task.. I want to add an arrow to the chart using object create when MACD histogram changes direction. Please can someone advise where to place this in code, and how to go about about doing this... do I create conditions using ExtMacdBuffer and...
Candle close cross MA alert.mq4 Not working Please Help        Hello, This indicator is suppose to provide one Alert or Alert email when price is below a Moving Average and a candle closes above it or when price is above a Moving Average and a candle closes below it....
  questions about && (22   1 2 3)
Hi, Had an EA trade in clear violation of its rules and I can't see anything obvious in the code.  I use several MA's to identify trend an only trade in the direction of the trends.  I did notice the following in my if statement if(xmma < xmpma &&flma < flpma)   //compare the MA of bar 1 with the...
Any code that can cycle through several buy stops or sell stops and detect duplicate pending orders then delete one of the duplicates?  Will be very grateful. Thank you
Code to press the compile button in MetaEditor via an expert 
I would be most grateful if someone can help me with my problem!   I currently have very similar EA's that work fine on 5 different instruments (mostly currency pairs) - but if and only if I have no current open positions.   I am a very beginner programmer and have adapted a program I obtained here...
Hi, I got an account which I messed up in the past. Now since January I found a good system to trade and want to evaluate the account only from January 1 on. Can I filter my mql5 signal I set up only from Jan 1st until xx.xx.xxxx or is there a tool/programme where I have useful statistics on MT4...
Hi, i got an mql4 file of an EA and i would like to add a code in it. i want the EA not to trade if the spread goes above 12 . what should i do ? please help. thanks in advance
  USDX (2)
can any friends share a usdollar index source code in mql4?thank you very much.
I made an EA and it's incredibly profitable when I go back farther than a month for test, however when I test closer to this month, it comes out as not profitable at all. i understand this has to do with not having all of the tick data that far back, but im wondering if i can make my program trade...
Hi Everyone! I hope you are fine. I have a problem -just sometimes-. I am creating a timer handler like this... EventSetMillisecondTimer(50); And works fine. But some users experience this error: Cannot set milisecond timer(50) and the program fails. Am I doing something wrong? Thanks in advance
Hi Dear Friends Recently I want to make a piece of Code to Print all Information Of Account into Chart and Delete them After a while Hence I use the Same object for All part of information So I decide to Used a for Loop to Create Object and I use two Array in that Loop, First for Object Names and...
hi I want the coding auto loading All symbol and all time frame data
Hello, (I have searched everywhere already, found many people who have the same question but received no answer. I tried hours to code it myself, i have very bad programming skills.) What I need is a script which opens a pending buy order, X pips above the last candle's close price. (additionally,...
I want to send data (values of 5 string-variables) from my Java application to my MT4 EA. I have tried this by making the Java application write to a txt-file and copying the file to MT4-data-folder and an EA accessing the txt-file using FILE_SHARED_READ, however this was not working. Does anybody...
Hey folks, I am currently sitting on a code which has my own calculation. I succeeded to code the calculation into MQL4 for the current period. However, I want to look back in time and see the indicator go as well (kind of a loop) also for evaluation of the indicator based on history. I had the idea...
I want to insert Bollingger Bands indicator through Insert panel menu ,but Stochastic was added ,the MA indicater was instead by Money Flow Index .
Hi, I would like to send notifications via Meta Trader 4 platform (from Windows server) to phones and tablets with Android system and Meta Trader 4 platform installed on the machines. My questions are: 1/. How many devices at the same time can I operate via one terminal server started on Windows? 2/...
Hi,   I am looking for help see if an indicator I’ve developed can be createdinto a trading strategy.   The basic concept of the indicator is to gauge the strength of thetrend in relation to the previous number of X bars. For example, if theindicator is set to look at the previous 50 bars, it will...
Hi,  I am trying to get the Stochastic value from other Symbol like below but i got 0 value. if(Symbol() == EURUSD)  {      double Env_USDJPY_Sto_Cur = iCustom("USDJPY",60,"Stochastic",K_Period,D_Period,Slowing,0,0); }  May some1 can gives some advice? thanks~
I am looking for a 2-color moving average that can be plotted on the Awesome Oscillator on MT4. Any help is much appreciated.
Hello, I need a function to close trades in a group, grouped by comment or magic number or whatever else.... when one of them hit TP or SL. For example I have 6 trades in a group at the same time and each trade has 50 pips SL and 50 pips TP. When one of them hit TP or SL all of the trades in the...
Hi guys, I would like to hear your thoughts on this. I have spent a few months developing my EA that seeks out momentum and tries to capitalize on it while having enough downside protection to be profitable. My EA has 9 entry conditions and is currently profitable, however I feel that I am missing...