MQL4 and MetaTrader 4 - page 70

Hi coders I get compiler error "variable already defined". Why Please advise Thanks void OnTick () { //--- int ticket,i,total,result; total = OrdersTotal (); // same variable without errors here line 36, but not on line 43 ??? double faster = iMACD ( NULL , 0 , 12 , 26 , 9
  What is wrong here (BB EA)?  (13   1 2)
I would have asked the guy I am copying this code from directly, but that is not so easy. Here is the code: void OrderEntry( int direction) { if (direction== 0 ) { if (OpenOrdersThisPair ( Symbol ())== 0 ) int buyticket = OrderSend ( Symbol (), OP_BUY, LotSize, Ask, 3 , 0 , 0
[Deleted]
  Code to read from Journal?  (15   1 2)
Any way for MT4 to automatically read what prints in the "Experts" and/or "Journal" tabs in the terminal window?
Hi, I created an indicator to display volume + spread as 90° turned text objects in its separate window. At the beginning everything looks perfect!, but after a while (some hours on the m1 chart) it gets mad look at the attached snapshot. Can it be that mt4 gets into troubles by the non standard...
Hello... Could someone here help me. How do I make the EA in MQL4 for multi currency. Or could someone show the link to make EA in mql4 for multi currency? Thank you.
Can someone please kindly tell me how to find the date of a particular bar that is say 50 or 100 bars back (in code), so I can use that date for my indicator parameters. (I only understand MQL4 to some extent --- MQL5 is too confusing for me) Thanks in advance for all the help I have received here
Is there any way to monitor opened positions during the strategy test, and also close them by manually if needed. And i don't mean the "Results" tab, i mean the same view like you will have in live trading. Thanks,
Is there a way to comment out selected lines ? The /* */ break when used multiple times Thank you
int totalOrders = OrdersTotal (); int magicNumbers[]; ArrayResize (magicNumbers, totalOrders); int magicNumberCount = 0 ; for ( int i = 0 ; i < totalOrders; i++) { OrderSelect (i, SELECT_BY_POS, MODE_TRADES); int currentMagicNumber = OrderMagicNumber();
I would like to draw a rectangle in the background of the chart but with no colour fill. It looks like I need to set the 'back' property to FALSE in order to do this but I would like the 'back' property to be TRUE if possible so that the border lines do not draw over other objects. Is there a way to...
  Martingle EA + RSI  (14   1 2)
ello all, First of all both EA and Indi is not mine got it from internet. Need EA expert to modify the EA to open the order based on in RSI arrow, eg : if 1st arrow "up" open buy if TP not hit then open another buy at 2nd arrow and still not hit open buy at 3rd arrow and continue.. until max order
if I get the current Bar number for example 65029, then Close[65029] will return the value, but if directly use the Close[Bars] statement at that time, it will generate an "array out of range" warning, except the line "#property strict" is not written in script, is there any explanation for this
I need an expert advisor in mql4 that open pending (BuyStop and SellStop ) orders after entering the price of (BuyStop and SellStop ) every time in a text box with buttons on the chart to send the trades Also I want the expert to have tack profit and stop loss with trailing stop option
Hello! I have observed that during EA test, if I print order profit after is closed, there is a difference betweeen this value, and the value showed in the tester for the same trade. Maybe I am reading OrderProfit wrong? void profit_record() { if ( OrderSelect
I have built some EA's that work fine on MT4 terminal with 'Autotrading' switched on. But when I migrate them to VPS they will not trade. The only unique thing that I can see is the EA's that do not work on VPS use Indicators on Custom Timeframes, for example: Moving Average on a 2 Hour timeframe
[Deleted]
  Pen/pencil tool  (9)
Hi, I need a pen or pencil tool so I can draw my own lines etc on my charts; is there an add-on & where can I get it? Thanks....
Hi all. I'm trying to find EUR/USD 5-Minute historical data for MT4 so i can backtest different EA's from this site. However, i'm not sure where to download the data from. I'm aware of the data provided by my broker that can be downloaded, but the data is limited to only maybe a month back, and i'm
When will be released the MT5 with strategy tester included ? Also, will the MT5 strategy tester be able to test EAs which use multiple currencies at once ? Thank you.
Hello gang, hope you all well. Im trying to debug my EA and itd be very helpful to isolate objects the tester created per trades. For example, hiding loser trader, or winners, or just hide sells/just buys. Im not sure if is it necessary to create Struct for it, and if so, i imagine i need to keep
[Deleted]
  How do I calculate lot size?  (35   1 2 3 4)
Let's say my mini account has margin of $10,000, and I want to risk 2% on the next trade (that is, simply use $200 to buy <some amount> of contracts). [I realize this is a limited view of "risk". I'm not interested in stopLoss pips, or profit targets, or whatever.] Using MetaTrader, I get the
I'm backtesting an EA and everytime i stop the backtest the MT4 platform closes down. I have 3 MT4 brokers and have the same problem on all 3. This is slwoing me down too much. If somebody has any advice which could help solve this problem I'd greatly appreciate it. Thanks
Hi guys, how to get the distance between 2 Moving average in different timeframres
I would like to be able to run automatic scripts that would launch metatrader backtests in parallel (preferably with MT4), and which could automatically export the results to files in order to perform post-processing on them outside of metatrader. Are there any solutions: 1- to call metatrader via
[Deleted]
I have 3 MT4 Terminals, therefore 3 Strategy Testers. OANDA - V4.00 Build 1370 11 Jan 2023 MyForexFunds - V4.00 Build 1370 11 Jan 2023 FTMO - V4.00 Build 1370 11 Jan 2023 I have a problem with all 3 Strategy Testers, I cannot use a "Custom Spread". Once completed The Strategy Report always used the
I have the following code for news trading #include <Calc_Lot.mqh> #include <Points.mqh> #include <check for trading.mqh> #property copyright "Copyright 2022, MetaQuotes Software Corp." #property link " https://www.mql5.com " #property version "1.00" #property strict //variables double
An indicator that shows some of the important levels... Guys I've been trying to make my own indicator, but I can't even make a line work properly... I don't just need an indicator.. I want to learn how to do this <Deleted> ... So first of all: does anybody know of any online resources where they
Hi, Since build 482 the ability of choosing your Data Center manually has been removed. I know that a lot of people messed up by choosing unsuitable Data Centers for themselves and flooding other with requests. However, I have noticed that the automatic selection of my terminal isnt correct with
Hi Guys? The below ia an MQ4 MultiCurrency Expert Advisor code for 10 Currency Pairs.However, the code compiles with 11 warnings. Warnings are:return values of 'Order Send' should be checked.Please how should I fix these warnings? Please advise me and I shall appreciate.Thanks!!! void OnTick (){
Hello to everybody. I use MT4 and I put my orders in an old school way ;-) I mean manual way : order stop market, with stop loss and take profit. I'm gonna have a few accounts to manage. I tried MT4 multiaccount but there isn't any charts. Is it possible to copy my manual orders from my MT4 as a
Hi, I am a starter. Using moving average.ex4, i change input lot to 1,2,3, but the tab 'Results" show the size still 0.1 . Can anyone explain the odd phenomenon? Can anyone help? Many thanks