MQL4 and MetaTrader 4 - page 72

Hi! I'd like test whether the OrderComment is a convertible from string to a number or not, but I can't find anything like an IsNumber() function. Is it possible to get around this? Basically I need the code to test wehter OrderComment() is of type "1.3650" or "BALANCER" in order for the code to...
Hello all, I am new here and looking for some help. In the attached file "Highlow custom.mq4" you'll find the source code of an indicator I downloaded. It has 3 buffers (buffer 0 1 2) which provide the high middle and low of selcted timeframe. My problem is when my ea requests the buffer value, it
[Deleted]
Hello everybody, i've got the following problem when testing ea: The result in optimization and testing without optimization are different (same parameters ). I think that come from the spread not taken into consideration in optimization mode. can somebody could confirm or indicate me the origin of
I'm having an issue where I've written an indicator and am now using it to backtest a strategy.  I start my backtester in visual mode and then drop my indicator onto the chart.  When I do that, the lines in the indicator don't ever update from that point forward, they just stay at the same value,...
Hi! I'm considering building an EA to assist me with entries for the strategy I'm trading right now. The only two aspects that are beyond me are the UI... how to create a draggable line on my chart that will set my SL & breakout levels, and how to create an on-chart interface with buttons for BE and
  ATR on chart  (11   1 2)
the ATR indicator is built-in in mt4. is there a way to put in on the chart like in tradingview rather than in a separate oscillator window
Hello there, Hope you are all well. I noticed my GVs disappeared after 4 weeks. So is there any way to extend the GVs to exist more than 4 weeks? If no, what would be the simplest alternative(s)? I'm not a coder originally, so please explain a little more <3 Your advice is greatly appreciated
Hello, Currently, I’m trying to merge many MT4 backtest reports. There are many tools that allow this but unfortunately all tools that I use merge only the trades without recalculating the lot sizes according to balance in the time of opening trades during backtest. Now I have a task in which it’s
Hi, could someone give a hand of help? I;m trying code a EA for MT4 . The EA checks if the Fibonacci Retracements tool exists on the open chart of the trading instrument. If it exists, the EA reads the price value corresponding to Level 0 and the price value corresponding to Level 1 in the Fibo. It
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