Download MetaTrader 5

MQL4 and MetaTrader 4 - page 23

To post a new topic, please log in or register
Has anyone experienced (in Metatrader 4)   having their position closed for no reason? in the DEMO version? It happens after about 30 minutes.
What and why do I get this as my MT4 EA opens an account?
hi all, I hope you are doing well. I'm looking for a MT4 programmer to develop the following EA: Step1: Write every hour all retrievable details from the orderhistory section in a mysql db table.(drop the old table in mysql db) Step2: Write every hour all retrievable details from the open/pending...
Hello all! I'd like to add to some EA's a notification function that, well, notifies when a TP or SL has been hit. I made a kind of BETA version of the actual code but I'm facing some troubles that I'm not sure how to overcome:    for (int i = 0;i < OrdersHistoryTotal(); i++)    {      bool...
Dear Metatraders  I am trying to develop an indicator that show me the highest high and the lowest low of the last 100 bars of all Major currency pairs,  This is part of my codes: double dEURUSD[2];dEURUSD[0] = High[iHighest("EURUSD",PERIOD_CURRENT,MODE_HIGH,100,1)];dEURUSD[1] = Low [iLowest...
I can only enter integer into the Deviations box. If possible please draw an arrow on the chart please, Red for put and Green for call. thanks Here is the indicator: bollitoucher.mq4
Hello, I'm working on some EA's that uses Trailing Stop Loss, I came around with this code: void Trailing_SL(){    for (int i = 0; i < OrdersTotal(); i++) //Iterar con todas las ordenes    {      bool res = OrderSelect(i,SELECT_BY_POS,MODE_TRADES); //Seleccionar por index i        int Local_ticket =...
I set EventSetTimer(1) in OnInit (bool result is "true") , and I put my code in void OnTimer, but the indicator is still going through OnCalculate, which defeats the purpose of using OnTimer because the data received from the broker isn't faster than 1 second in some cases. Is there a way around...
I want to populate an array with currency pair values. Arrays are quite a bit different from Javascript I'm gathering. I'm totally new to programming and I took some online courses in Javascript to help prepare me to learn MQL4. I'm running into a snag with arrays. I dont understand the MQL4...
Please help some experienced coder. After compiling get error constant expression required. Problem is in array, strenghts is in pips. My idea is to get stongest and weakest pairs. Code:                 int num_array1[8] ={EURstrenght,USDstrenght,AUDstrenght,NZDstrenght,CADstrenght,GBPstrenght...
Anybody know how to fix a failed [Common error]? My EA did a sell trade which is successfull previously and now when it tries to place a sell trade again, it has a failed [Common error]. No problem with the buy order. I have search in the metaeditor documentation and this forum but it doesnt do much...
When I select specific timeframes for visualization in indicator properties, does it also stop the indicator from doing it's work for the remaining timeframe? Or is it that the indicator still works in the background, but the display is disabled?
  ASCTrend system (493   1 2 3 4 5 ... 49 50)
I start this thread for the following reason: - to develop ASCTrend EAs according to the manual trading systems described here https://www.mql5.com/en/forum/173249 and - to delevelop new asctrend system for M5 timeframe. Please find updated templates (3 templates) and all the indicators for this new...
When the indicator thread becomes busy and misses the next tick, the missed tick data is still displayed in the Market Watch tick chart window. So I wonder if there is a way how to get the missing tick data that is on display in the Market Watch window. I thought about the file ticks.raw file...
As someone with no programming experience I will have a lot of dumb questions. Here's one now. Can someone please explain to me why I cannot get this to print to my journal. It's very important for me to see. I cannot get either the Comment function or the Print function to work and I'm not...
Hi everone, I have a Question. I need the OrderProfit() of the first open Trade of the Buys and also of the Sells. But I have no Idea, how to program this. Can somebody help me? bye, tom
I need a simple code.. All I want is an external settings to be set up with two options (on and off) or (true and false) When "true or on" the Expert works and continues to work When it is false, the expert works but does not continue working after closing all open positions and pending orders.  can...
G'day everyone,  I was wondering if it is possible to get a notification of a trade occurring via my Apple Watch?  Thanks in advance for any answers. 
Hello everyone, I am looking for a way to send trades from mt4 to binary.com. Website offers API. But i cant understand how to send properly WebRequest. Or even how to communicate with this API. Or I must use some WinApi? Can you please, explain or at least give an example of communication with that...
I'm not sure why I'm having such a hard time with but here it is. I'm trying to get the value of the GBPEUR no matter what chart I drop my indicator on. Then I want to store that value in a variable. I have been trying to test this with the print function so I could see if I was successful however...
  CANT LOGIN (1)
hi,i keep getting the invalid acc message on my mt4,help please
Hi, i need help once more,  i never worked with functions before, but when the code starts to increase you have to use them, or you get spaghetti code,  i need help to get more than 1 returned value from each function, it's possible to do it? I've been searching, you can use something like passing...
Hello, It's very glad to contact with you, first. The followings below is my difficulties, and hope you to read and help. I have a pre-made indicator that shows simple arrows for Buy / Sell Entry. This pre-made indicator does not read the values of the 1st previous (closed) candle properly. And the...
hello, if one function offers me values like 1,1,2,2,1,1,4,4,3 how i can bring them to 1,2,1,4,3.... plz help :)
Hi When I go to the donwload centre to download more date for testing EA. I get a message saying there is no data to download. But for example Crude oil would have dat 1 or 2 years back surely. Can anyone help out why it won't download the data? Thanks
Hi.. need someone to rectify the issues i'm having.. The alert is all working fine... But if the next bar have the same rules, the alert won't appear again as previously it has already appear.. which means the alert only trigger once bool alert[][9]; this the top part of it..   {   int i=0,j=0;...
I need 15M 1H 4H 1D 1W  for all 28 pairs for 30 periods back in my EA. I have used a very good tool in MQL5 published  here but is there a way of doing this in MQl4?
I need to copy the last ten highs from the high[] array in OnCalculate()    int Length = 10;   double ahigh[];   ArrayResize(ahigh,Length);   ArrayCopy(ahigh,high,0,0,Length);   for(int i=0; i<Length; i++)   {    Print("high[",i,"] = ",high[i]," ahigh[",i,"] = ",ahigh[i]);   }   int compare =...
Hello, I have one modified version of sweetspot indicator(draws lines after 10 pips). Every line value is actually the price,  yes? I'm too dumb of coding and don't understand which variable in this code is the level or let say price? I would like to use this value for comparing something..
Hi, I created this price ticker as I wanted to use the Market Watch prices and to reduce the quote to one less decimal place but still see the fractional element. It works great but the only snag is the colour doesn't change. What have a i missed? Thanks in advance. #property...