Download MetaTrader 5

MQL4 and MetaTrader 4 - page 471

To post a new topic, please log in or register
int start(){..ObjectCreate ("Point"+Time[i],OBJ_TEXT,0,Time[i],Close[i]);ObjectSet("Point"+Time[i], OBJPROP_TIMEFRAMES, OBJ_PERIOD_H4);ObjectSetText("Point"+Time[i],"Cross"+Close[i], 10, "Times New Roman", White);return(0);}int deinit(){ObjectsDeleteAll(0,OBJ_TEXT); // It will delete all OBJ_TEXT...
Shall i use NULL instead of Currency name? I tried as NULL instead of EURUSD,but results are "0"? int    digits=MarketInfo("EURUSD",MODE_DIGITS);
Hi, are there any MT4 plugin for MT5 platform, so that I can use all my MT4 EA/indicators on the new MT5 platform?
Hi, I heard in somwhere that this indicator is very useful. The probleme is that there is an error in his code. :( I am not a coder but i know some programming so i checked and i think it is not a big deal so can some one please give it a look and try to fix it ?
Hi: I have just met a problem of the custom indicator data buffer synchronization problem. I made an indicator called ML_iDayATR , which is used in the timeframe smaller than D1. This indicator plot the day ATR value in the chart like H4, H1. The first run of ML_iDayATR indicator is very slow. I...
Hi Please excuse my ignorance... I am currently testing a strategy that I have build in MT4, and it seems to be very profitable in back testing and also looks pretty good in demo account testing. I am pretty close to opening a real account and making a deposit to beginning live trading, but the...
55839 - in this post, I learned how to open an order at the start of a bar. Am using this with great success. What I need to know now, is how to delay opening the order for X no. of minutes after the opening of the bar. Example: On the 4 hour chart, open an order at the opening of the 4 hour bar...
Somebody Please help, I don't want my ea to trade between 15.00 and 20.00 How should I code this and add it to my ea? Your help is highly needed. Thanks.
I am trying to delete pending orders but the pending orders won't delete. The EA  is eg: When the Buy criteria to "Open" is meet place a Buy at Market and place a  pending order. When the Buy criteria to "close" is meet then close the open Buys and pending order should be closed. Short Trades same...
My EA is set to EachTick, but my objects does not update values/location when orders gets opend or closed. my code structure as following: int init(){WindowRedraw();ObjectDelete ("MyLine");}int deinit(){WindowRedraw();ObjectDelete ("MyLine");}int start(){WindowRedraw();ObjectCreate ( "MyLine",...
Hi, If I draw a horizontal line on W1 and switch to anyother time frame it disappears, on the time frame I switched to and also W1 - this is reallllly annoying... Any ideas if this can be done? Thanks mcia
Hi, it took me hours today but as long as I had Symbol() in the deinit() function (in order to delete a market specific file) my terminal (build 509) seems to run into an endless loop with max cpu-time consuming - anybody who can confirm? As soon as I replaced Symbol() by a global var SYM set at...
Hi there, i recently restarted programming MQL4 and made myself a Trailing Stop EA. Sadly the following version, which shall "trail" the Stop Loss depending on the Highs and Lows of the 3 most recent closed candles does absolutely nothing when activated: int init(){   return (0);}int deinit(){...
Hey All :) New quicker question this time! How can I tell "Close[1]" to be focusing on the 4 hour time frame, irrespective of the time frame I am currently looking at? Close[1] > Hour4_60 // EMA -//- I want that Close[1] to be the close of a 4 hour bar? Many thanks as usual!
Is it possible to Create Specific color for some Print statements that show in the Experts tab ? To highlight some print statement to find easily. Thanks
Hello Apologies for another really dumb question, but its beyond me! In my EA, I'm collecting and writing data into weekly Excel spreadsheets, which I'm incrementally numbering, creating one new sheet per week. This is fine, but I end up with spreadsheets all named as numbers only. I'd like to use...
I have seen here at many places refer http51.dll but where is it ? Where can I find the source code ? I tried surfing through the complete code-base but no luck. Hopefully, someone can help.
  Help with ADX (16   1 2)
I dont know but i guess ADX indicator has no fixed marginal limit between to move like stochastic or rsi.My problem is that i've set up a setting where it will only take trades if ADX>50 and it wont work it will take trades whenever it wants even below the preset 50 level.But if i set a value like...
Hi guys, i'm searching with an EA in all Forex Pair for special conditions. If the EA says yes, i want to open a chart of this pair und put an arrow inside. Is this possible? I can't find something like this. The problem is there are 5-10 results and i don't want to open them by myself and put an...
Hi, I have an EA that worked in back testing. However, a part of it failed in live trading. When a level is breached, it supposed to close a short and open a long. Although, it's doing so in the back tester, it failed to open the long in live trading today. I added the print function today, to see...
Hi, I would like to know how can I find an indicator window with mql4 where more than one indicator is attached, like on the screenshot below. There is 3 different RSI in one subwindiw, but WindowFind() does not work for "RSI(14)" and "RSI(21)". Thanks.
I would like an Indicator to do the following Horizantal lines 1000 pips range then 4 quarters of 250 pips then half the quarter with 50 pips above and below. then to do that on all the charts I have attached a pic for you also the Indi should do example GU 1.5000 - 1.6000 - 1.7000 should show...
  basket pips (3)
I'm trying to tackle an area re: basketpips I'm not sure if i ought concern myself with pipvalue at all. i.e. http://www.earnforex.com/pip-value-calculator Account Currency AUD Currency pair AUDJPY Position size, units 100000 Current AUD/JPY 87.672 Price of pip 11...
I need an very simple and easy ea wich is opening every 100 an buy trade and every 200 and sell trade ! But I am a very noob when it is going near to programming something maybe someone helps a noob ( I will be very pleasured in your help ! Kind regards Nikita
I would like that the maximum slippage for the OrderClose function to be the distance between the current price action and the preset STOP LOSS I set it like this but it doesnt work,it gives me an error 4051 for invalid slippage please help: FOR BUY:     for(i=0; i<OrdersTotal(); i++)   {...
everyday I want to get high/low value for first candle.ie. 00.00AM I tried with 4hr TF: But shows different candle high/low.i valdiate date with nday!=Day(); Please help me to fix the issue. #define  ZEROAM 00    int shift=iBarShift(NULL,0,ZEROAM);    hval=iHigh(NULL,0,shift);    lval=iLow(NULL,0...
New article Building an Automatic News Trader has been published at mql5.com: This is the continuation of Another MQL5 OOP class article which showed you how to build a simple OO EA from scratch and gave you some tips on object-oriented programming. Today I am showing you the technical basics needed...
Assume ! my interrest separate windows is number 2 ( Total separate windows = 3). How about code for self get this separate windows? thank you
I want to play sound when: 1. Pending order active>>sound1 2. TP reached>> sound2 3 SL hit>> sound3 int start()  {   int    counted_bars=IndicatorCounted();//----   temp = 0;   for (int i=0;i<OrdersTotal();i++)   {      OrderSelect(i, SELECT_BY_POS);      if (OrderSymbol() == Symbol()) temp++;...
I downloaded the latest build of MT4 (509) and tried to use the strategy tester offline with tick data.. It reads the EAs that are EX4 files but does not seem to read the EAs which are MQL4 files. Is there something I am doing wrong?