Download MetaTrader 5

MQL4 and MetaTrader 4 - page 484

To post a new topic, please log in or register
Hi:   I have the following code which is not working:   file = FileOpen("Result.csv", FILE_CSV|FILE_WRITE, ";");         if ( file > 0){            FileSeek(file, 0, SEEK_END);             FileWrite(file, TimeToStr(Time[g_Shift], TIME_DATE|TIME_MINUTES), "TREND=", g_Trend, "Open Short",...
need to convert a wonderfull Indicator to Expert advisor ...... Any Help And promise it will be penifit.
Hi. I'de control numbers of order to 4 trades for each pair symbol using an EA. Can you help me ?
I am new to MetaTrader and I am having troubles with my EA. I activated an EA in my demo account and start() is not getting called. I was developing the EA a couple weeks ago and it was working well both on the demo and strategy tester. I have been away for a couple weeks, and upon my return; after...
So I am testing my EA with the EXACT same parameters on the d1 timeframe and comparing 90% modelling quality using data from metquotes (history center) with 99% modelling quality using tick data from Dukascopy. I would have thought that the tick difference (not accurate < 1min on 90%) would not make...
Hi all. I need some help in writing the code for an EA I am testing to be able to determine lot size based on account balance an the number of pairs being traded. Thanks 
I have some few custom indicators that are not activated when you start MT4 but they need me to change the time frame to see them turn. it is possible to correct?
Hi, I know ZEROOOOOOOOOOO about coding. Im switching from my old platform to metatrader, and I wanted to use my old volume indicator (dpr file) in metatrader (mq4 file?) When I open the DPR file with meta-trader, this is the code I get; Can someone please convert it for me into a mq4 version?...
Hi, i have completed the EA as per customer requirement.but he need s/l & t/p should have following conditions. can anyone help on this. EA placing orders based on 5min chart Stop Loss & Take profit 30% of Daily ATR with 1:1 Risk Reward Ratio. attached image will breify more..
Anyone has experience please share to me. I test my EA with 99.9% model quality and i want to know : Is the real account will get a result same or nearly the same as 99.9% model quality result?
I have read through the threads in the forum which seem to be outdated and not have an ideal solution. Is there a way to auto detect the difference between broker time and GMT without the user needing to input a GMT offset? Currently I use code that will add or subtract the GMT offset from the...
Wecan look for a specific magic number by looping through MOD_TRADES. for( int Loop = 0; Loop <= OrdersTotal() - 1 ; Loop ++ ){  OrderSelect( Loop , SELECT_BY_POS , MODE_TRADES );  if( OrderMagicNumber() == Magic_Number )   {    // some interesting code  }}  Butwhat happens to that loop when you...
Hello everyone, I was looking for advice on orders accounting coding. I have coded 3 EA's that I am using, and have not tried to run them at the same time, but on separate MT4 terminals. I want to run them on the same terminal but am fearful my O.A. code is outdated. Any code anyone use to run...
Hi all, I need to repaint the bars on my charts and I came up with the following half solution: //+------------------------------------------------------------------+//| Custom indicator iteration...
Hi Guys, I need to shift the bars generated by the code below: int i;for(i=0; i<500; i++){   string name1 = "barBody" + i;   string name2 = "barClose" + i;   int type = OBJ_TREND;   int window = 0;   datetime time1 = Time[i];   double price1 = High[i];   datetime time2 = Time[i];   double price2=...
Dear All,    I am a newbie in using the strategy tester. When I started to use it, I dont know how to make the setting correctly. My questions are: 1. how to ascertain that the data over the specified period is reliable? 2. Is there any relationship between the From date, to date and the Max bars in...
  Link Graphic (3)
First of all, sorry fior my english, I'm french... 1/I'd like to know how can I link charts. For example, I'd like to draw a line in the 4h00, and I'd like to see (to be report) on the 30 minutes. Is it possible ? Thanks
//+------------------------------------------------------------------+//|                                              Buy  with SL and TP |//|                               Copyright © 2008, smjones          |//|...
Hallo please help me...   I have a problem with SendOrder on OIL. How do I defined SL and TP ? For the definition price I use NormalizeDouble. My EA work in backtest O.K., but on real trade type error price SL a TP.    For example: double slb=NormalizeDouble(Ask-SL*Point,Digits); double...
Hi All Ignore whether this check is actually a valid way to go short :-) Can any one spot what's up with this code, I cant figure it out: if(dbMACDDivergence_Bar1 <= dbDivergenceShortSetting)  {     //short conditions met }    Where dbDivergenceShortSetting is set to -0.3   the aim of the check is...
Hi there   When one uses the ordersend/orderclose command, I know that ordersend returns -1 if it fails, and some positive integer if it succeeds, we can store this in a variable called ticket. when you use orderclose, that can return true or false to indicate whether the close command succeeded,...
Preliminary Announcement of the New MetaTrader 4 Build 491 New MetaTrader 4 client terminal is being prepared for release. Terminal: Revised one click trading system: When One Click Trading mode is enabled, the trading dialog is closed right after a successful operation. In case of an error, the...
Hi: Can anyone explain what's the meaning of an OrderSwap in a forex market please? Also, in the mt4, how can I get the pipcost for a single pip please?   Thanks  
when i load mt4 platform i have to recompile ea's to work..otherwise the ea's placed on charts won't work...
please who can help explain this?......It is possible(good) to program about five(5) algorithm systems in just one EA. For example; if i set all the setups to 'True', the EA will trade all separately when their signals matures. or  if i like i can choose some, set them to 'True' & set the rest to...
To sell short on next bar - how would I manipulate the following or is this the right way to go to sell short on next bar? OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"",300,0,Red) OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES) Predominately I would like to sell short on next bar...
can we use java for making expert advisors?? seen some post and downloaded files but not able to understand how to use them seen this--https://www.mql5.com/en/forum/121466 page 4
Hello Forum, hope someone might help me clear up a little confusion. Was trading manually yesterday and noticed that on occasions certain candles appeared to have a different final appearance than I would have expected. Specifically and I will use the example below, I am not sure how the brokers...
I am currently working on making my EA able to look at the ADX exactly 20 minutes ago.  This is a continued idea from https://www.mql5.com/en/forum/144585 but I have worked over the weekend on this and think its appropriate to open another thread (if I'm wrong here, sorry administrators) My code is...
Hi everybody, I have downloaded the demo version just to try currency trading. I can create orders but when I go to choose the type of currency, in the grey box, nothing shows up. Also in the Market Watch all my symbols are grey, not black like I am seeing in many pictures. Could someone direct me...