Download MetaTrader 5

MQL4 and MetaTrader 4 - page 226

To post a new topic, please log in or register
Hey coders, I program an expert advisor and there is one part which should only be executed one time a day after 11:00 am. I do it this way but there is something missing: if (TimeHour(iTime(NULL, PERIOD_M1, 0))==11 && TimeHour(iTime(NULL, PERIOD_M1, 1))==10) {...............}  But the problem here...
After I used the script "CSV2FXT" on Eareview, the 2 issues below found and who knows how to fix? 1. I downloaded EurUsd.csv from dukascopy.com.     I opened M1 chart and convert the EurUsd.csv successfully, then H1 chart also successfully.      However after testing, the quality is always "n/a"....
I know... has too much here but i can't find something that I looking for... if someone could help me.... I have a EA that will send Order to the market calculating SL size getting price base on HLINE using a Risk % extern bouble.... but i'm have problem.... sometimes SL its too big exceding risk %...
Hello all I have been searching the net for videos on how to test my system but I cant come up with anything showing how to do it. Do I have to write a EA to back test, I realize this may be silly question for some but I am lost. Im just looking to get pointed in the right direction I am lost....
Hey guys, Can anyone help with a for loop to close all pending order if and only if there are currently no open orders? Below is an attempt which I believe is pretty incorrect: bool DeletePending=false;  for(int z=OrdersTotal()-1; z>=0; z--)   {    if(OrderSelect(z,SELECT_BY_POS,MODE_TRADES))...
Please help on this! eg: if USD major news is on 10:00am i must get true/false feed for my EA. so that i can tune my ea according to news time! currently i added parameter as NESOn=true/false, i check manually from news website and when USD news on 10:00am i change parameters manually as true/false....
Is it possible for the developer to run promotions in the market?  Like can the seller generate coupon codes with expiration dates and maybe even have certain # max of users that can use the coupon?  Can more than 1 coupon be generated and tracked?  And on the order form, is there a way for the...
There are several posts regarding the continuous reloading of custom indicator in EA and none of them actually solves anything. MT4 has a bug in opening of custom indicator, and i cannot find the trigger. Sometimes it is working fine, and sometimes it keeps reloading, without executing any code...
please can any one help me out i have been trying to draw lines in an array that is in a sequence of 10pips to 5000pips above the array and a sequence of 10pips to 5000pips below the array this how far have gone : #property indicator_chart_window input int     Step = 10; double YesterdayHigh; double...
Hi!! Picture below is "Tick Chart MA.mq4" (attached). Add SAR indicator (Ask & Bid) would be really cool!! Ideas?! This help us to built HFTs.  
Hi,   In the MT4 mobile app, the pairs AUDCAD, AUDUSD and EURCAD are grayed out. I can view the charts but I cannot trade.   Anyone know what the problem might be? 
Hi everyone,  My data provider recently had a conflict with the CME about usdx data feed so I tried to be smart and quickly merge two pieces of mql4 code together to make up for the lack of data.  Basically the code does:   1) calculate the USD Dollar Index values  2) draw custom candles in the main...
Is there a way to reload the my Profile after a couple minutes automatically?... lets say my EAs are trading on my Profile, is there a EA that i would load on to random chart and it will reload my Profile that im currently using after some amount of time based on timer?,   thank you! 
Hi all,  I have doubts whether this code is correct.   The code is to export data in real time. I had still not successful because I think that the code is not correct. But still I could not fix. Can anyone explain why the code is not correct?   #property copyright #property link      #property...
Hi quys, is some restriction for display number functions which are sorted in MetaEditor?  My code mq4 files  have about 110 functions and the last function not displayed in list functions.  Have you ever encountered this problem? Thank you. 
  1)  Try to add CCI indicator to chart from Custom indicator MT4. the OK , Cancel and reset is not work. 2)Issue open new window chart.  error:C:\Program Files (x86)\FxUnited Client Terminal\profiles\Default\chart5.chr was not found.    
long volume[];double candlesize[];for(int z=5; z>=0; z--){     volume[z] = iVolume(Symbol(), Period(), z);      if(Close[z]>Open[z])   candlesize[z] = ((Close[z]-Open[z])*100000);      if(Close[z]<Open[z])   candlesize[z] = ((Open[z]-Close[z])*100000);} Wrote this to caclutate out the candlesize in...
hello,   i want to load webpage on chart window  using script or expert  i hope i find helping here   thanks
Hello All, I have a brief inquiry about backtesting in MetaTrader 4. I am in Australia so my account is obviously in AUD. When I backtest I suspect that the platform converts the currency from my account  to the currency I require for a trade based on today's rate. This can be problematic if you...
Hey guys, Is there any simple way to save the open time of an order after the OrderSend() function. Something like... //global datetime buyordertime;Start()int BuyOrder=OrderSend(Symbol(),OP_BUY,LotSize,Ask,3,StopLoss,TakeProfit,"buy order",MagicNumber,0,clrBlue);buyordertime=OrderOpenTime();  Or do...
I receive this error ---- Tester: cannot change tested template-----  when I am trying to put my template in the program. In your new update it prevents the templates to be inserted on strategy tester. When we are doing development we put templates to find out if the system is working according to...
Hello, does anybody know how to take an order fill as a signal for placing a new limit order? Maybe by checking for changes in AccountMargin or the difference from OrderOpeningTime and now. Is there an easier way? Thanks for support.
It's now possible to run MT4 on Chrome OS (mostly: charts are not working yet). Here's how: Last year Google released a way to run Android apps on Chrome, so all you have to do is pack the MT4 Android app apk and you're done. I now have MT4 running on my Chromebook! Just download the APK format file...
Does anybody know how to set the OrdersHistory to Today, Last-3-Days or LastWeek acc. to setting it to All_History, Last_Month,... I am using this function: void SetOrdersHistory(int x){   // https://forum.mql4.com/ru/14463/page5#401551   // https://forum.mql4.com/46407#596672   // 33058 - All...
please can someone tell me the reason why order      ask < OrderOpenPrice()--------->buy  is not working. i have been using the function for long to open buy low but suddenly i discovered my ea is no longer opening buy order anymore but open sell very well which i sell high like  bid >...
Hi Everyone, I’m trying to make an EA that starts a trailing Stop when the profit reaches a certain level (in the code I have set the level to£1).  However, it is not working and I cannot work out why.  It seemsto set the Break Even figure OK but when the profit reaches £1 it does notmove the...
When I use the copyrates-function, the last bar has a different time then the time on the chart. How is this possible? And how can i fix this that I can be sure that I always get the latest candle?
Hi everyone, This is my first post about my first Ea. These code modified from "Moving Average.mql4" default file from Metatrader4.  double rsi; double lastRSI; int res;//--- go trading only for first tiks of new bar if(Volume[0]>1) return;//--- get Moving Average rsi = iRSI(NULL...
I came across a MT4 EA with approximately 10,700 lines of code and 1140 functions. I know this is a ridiculously large file and number of functions. When I complile the file, it compiles fine (no errors), but I get an error internal error #-1017 So my questions are : 1) What is the cause of this...
  Array out of range (11   1 2)
Most of the time, I get this on array's I create.  And it's usually due to a size limitation I placed on myself. But this one has really got me stumped. How is it that I manage to get the Array out of range error on this? datetime...