Download MetaTrader 5

MQL4 and MetaTrader 4 - page 261

To post a new topic, please log in or register
Hi guys ! I am currently backtesting an EA and I have a problem with the quantity of trades . I can't seem to find a solution to that, anyone who know what it is ? :) (SAME parameters, SAME product) ¨:  backtest for month of february (20 days)  : 23 trades.   Backtest for only february 18th (ONE...
Dear Sir/Madam,   When I try to modify one digit of order Price or Take Profit,  then the whole number change. Please refer to the following screen.   Also please refer to my suggestions       https://forum.mql4.com/66879.   Regards Dolemi   
I want to create a button from button.mqh with text in 2 lines but the \n is ignored in myButton.Text("Line \nNew Line");
Hi guys , Please i need help with contents for my Heiken Ashi candles EA . I have the functions below,   HA1=iCustom(Symbol(),0,"Heiken Ashi",1,i);  HA2=iCustom(Symbol(),0,"Heiken Ashi",2,i);  HA3=iCustom(Symbol(),0,"Heiken Ashi",3,i);  HA4=iCustom(Symbol(),0,"Heiken Ashi",4,i);  I want to know the...
Is there a way to get the start date of the fxt-tester-file? If I start a backtest I see in the journal:  2015.02.22 21:02:00.775 TestGenerator: symbol EURUSD period 1 model 0 from 2011.11.06 to 2015.02.06 Is there a way to check in OnInit() whether the start-date of the EA (Time[0]) is too close to...
1)    Add two Text Edit Fields to Order Screen, Dollar amounts of Take Profit and Stop Loss            It will be very nice and easy to operate if we can set Take Profit and Stop Loss in dollars. 2)    If it can remember Take Profit and Stop Loss for each symbol, it will be very easy to use. 3)...
Hi all I m new to MQL4, other than using OrderComment() function to read back the comment,is there a way to modify or change the existing order comment ? Please advice Thanks Tom
I'm getting the above error from my EA. But I have set 'Allow live trading' in the properties. Could this be because it's a demo account? There's also a smiley in the top right corner only he's not smiling. This is leaving me confused, any help would be appreciated. Thanks   
Maybe someone can help me with the following problem. I'm working on a expert advisor now yesterday it was working around the publication of the minutes of FED. The expert advisor did trade however it traded not profitable, because it closed the position very quick(as per EA). But now I'm back...
Hello All, Below is a H1 NZDUSD chart showing the Buy signals (Green Arrows) generated from my EA. Looking for suggestions for trade entry. Have tried BuyLimit on Candle 1, with limited success.  Blue line is 20 period SMA; Red line is 60 period SMA; Brown line is 200 period SMA. Have working code...
I want to know which programming is better for transitioninto MQL 4 territory – VB, C# or C++? I have a hobby for programming and I have some time and don’tknow which language to choose with the goal to transition toward MQL? Thanks in advance.
Dear Community I have a question regarding backtesting. Sometimes there are green Volume Bars below the equity curve when I backtest a strategy, and sometimes there are no volume bars. So it depends on the strategy I'm backtesting. Can somebody tell me what the volume bars are? Do my strategy has...
This has surfaced while working these days. It seems that, regardless that an order is active or closed (we tried only with market orders), both modes OrderSelect(), MODE_TRADES and MODE_HISTORY, will return true. If an order never existed, both will return correctly, false. Test it yourself: launch...
Can't install MT4 in Windows XP. Log   <?xml version="1.0" encoding="UTF-16"?> <DATABASE> <EXE NAME="teletrade4setup.exe" FILTER="GRABMI_FILTER_PRIVACY">     <MATCHING_FILE NAME="teletrade4setup.exe" SIZE="454752" CHECKSUM="0xC8A50C3B" BIN_FILE_VERSION="5.0.0.1026" BIN_PRODUCT_VERSION="5.0.0.1026"...
I've opened a demo account with TradeMasterFX broker on MT4 platform. I also installed MT4 application to my Galaxy S2 cellphone and started to use MT4 both on my cellphone and my PC. I forgot my password and now can't open MT4 on my PC. But still using MT4 on my cellphone. It's not easy that way....
Just getting the hang of writing EA's and debugging and using Strategy test. However, it seems that it's not possible to debug during a strategy test. Can any one confirm this?  It would be a fantastic way to test new code.   Thanks Russ 
I created a test indicator which draws a Label Object with "Arial" font name and a font size of 10. I tested the same code on four different computer/Windows 7s. The strange thing is that the size of the text of the label on one of the computers is (much) larger than the rest (the text looks the...
I'll try to combine min bar size and max wick size in one condtion but it wont work, each condition working only seperated ... How to use it both together like below? bool BuyBarSize=false;if (Close[1] > Open[1] && (High[1]-Low[1]) >= MinPipSize*point && (Open[1]-Low[1]) <= MaxWickSize*point)...
Hello Forum, good day.   I started out learning MQL5 a couple months ago and now need to translate an EA to MQL4 because the broker I will work with hasn't make the upgrade/migration to MQL5 and MT5 yet :(. Reading the docs, so far I've encountered several differences mainly on the way that orders...
  Code Problem (11   1 2)
Hello All, With these two order open orders: int BuyTicketOrder = OrderSend(Symbol(),OP_BUYSTOP,LotSize,Buy_Price,3,Buy_Price-(StopLoss*pips),Buy_Price+(TakeProfit*pips),NULL,MagicNumber,0,Green); int BuyTicketOrder_TP = OrderSend(Symbol(),OP_BUYSTOP,0.02,Buy_Price,3,Buy_Price-(TP_SL*pips)...
When in login with my account (let’s say"John") on in the MT4 website (https://www.mql5.com/go?link=https://www.mql4.com/)I give a password I land on the MLQ4 site. So far so good. The next click on for instance on “BLOGS”or “CODEBASE” brings me unquestioned on the MLQ5 website - where I don't...
I'm just starting to learn coding in MQL4 and have a question to someone with much more experiences in that matter.Thus, in this part of the script below ... OnTick() - function ...I would like to disable any new orders as well as modification of already existing orders ...whenever the spread is...
Hi All, Apologies if this is a silly query, I'm still a bit of a newbie. I have coded-up a simple strategy that uses the crossing of MAs to signal a buy/sell signal. I have utilised a lot of the concepts seen in the MACD Sample file that comes with metatrader. My MA variables are defined as follows:...
I dont think this is possible but: Can you add lines, say at the beggining or the end of Oninit function, via includes? Meaning: You have an EA with an include named <include.mqh>. Is it possible that inside the code of the include file modify the Oninit function of the EA? Thank you This forum is...
Dear Forum: Im creating a martingale EA, using objects, so when you change timeframe, for example, OnDeiNit() function is called, but I have "delete object" in that part of the code. So Is there a way to block the user the ability to perform that actions? Changing timeframe, charts, etc.... Thank...
As we know the computer monitor is getting bigger with more pixels on it. However each single pixel is getting smaller....I am having hard time reading candles in the chart. While I can zoom in the chart to make the candles become larger but the bar on each side of the candles remain the same size...
I created Indicator/EA for MT5 and it works fine. The problem occured when i converted it to MT4. I used same exact libraries that i used for MT5 versions like: a) MT5 - https://www.mql5.com/en/docs/constants/objectconstants/enum_object/obj_bitmap_label b) MT4 - https://docs.mql4...
Need M1 data for EUR/USD and USD/JPY for MT4 can anyone help? Please dont say alpari... https://alpari.com/en/dc/databank.html -- This link says data temporarily unavailable, been saying this for many many months. Can anyone point me in the right direction?
Hi, guys! I need your help. I wrote some EA and it worked. Then I need to refresh data every new tick and replaced int start to void OnTick. And it works in strategy tester, but does not work on real account. It do not open orders and no errors in Journal. Why?
Right after I login to the MQL4 Main site, I can click on the Code Base and page comes up Ok.Then I click on an Indicator or EA link and I get a quick message that I can not read. 403-____________ (second line) in Red. Rest is black Font. I just don't know what's going on here because I havn't had...