Download MetaTrader 5

MQL4 and MetaTrader 4 - page 143

To post a new topic, please log in or register
I need assistance with a custom function to control pending orders. My EA works around  placing one pending buy stop order above price and one pending sell stop below price. I have managed to limit the total amount of pending orders to 2 however in some cases the EA would place 2 buy stop orders...
How to draw a horizontal line on a MT4 chart without taking quotes into account? So the markets can move but the line stays at same height. I want to make a scatter plot within a MT4 chart and this should stay fixed on the chart, not move with the quotes.   By using this code it moves with the...
Hello,          I need to find or develop an Indicator that tells the previous candlestick is OHLC or OLHC. Can any Coder help? will appreciate,    
Hello my friends. I would love to be able to trade directly from Excel 2007 (connected to MT4). What I would like is a column in Excel for each of these information to send to MT4: Date and time, OrderLots, Symbol, Action, Price, SL, TP, Close. Date and time: date and time of order; OrderLots: Lot...
Hey Guys, I'm programming actually a EA. I need to visualize a specified area and I want to do this with the rectangle. But the problem is: In the initialized is the specified area right. But if I change the timeframe to e.g. M15 the rectangle doesn't appear right... - Why is that so? Everything...
Hi guys.. I know that this might seem very simple but for the life of me I cannot work it out... I have an Auto Fibo custom indicator that automatically displays the Fibonacci levels as the market progresses. How can I get it offset from the right hand side of my screen? I've played around with...
Hi! Is there a way to get/set the default background color of a chart in mql4? Thank you!
Hello, I need help to solve an error in my code ; double rates[]; datetime start_time="20:00:00"; datetime stop_time="05:00:00"; int  CopyRates(    string           symbol_name,       // symbol name    ENUM_TIMEFRAMES  PERIOD_M15,         // period    datetime         start_time,        // start...
So my friend and I created an EA that is profitable and its sends a ton of pending orders and opens a ton of orders. We were told we were opening as much as 100 orders a minute. We need to know what the maximum order send/ open limit is so that we can run this without them shutting us down....
Hi, this is my first post and my first MQL4 project - writing code for the %B indicator. I've used a combination of copy/paste and reading both the online book, articles & a Metatrader book to write my first code. I hope I've understood buffers and most things correctly. The compiler says there's...
Hi fellow traders, Do you guys know how to fix this time issue? There is 2 hours difference from settings in actual chart. I want the blue box to start from beginning of the day at 00:00. Thanks a lot   
Hi! I have an indicator (and a EA) which reads a relatively large set of data from an external *.txt file in the "\MetaTrader 4\MQL4\Files" directory using FileOpen. Everything is working correctly, but I would like to ask if there is the possibility to include this set of data into the ex4 produced...
Hi everyone,  As I was trying to create an array that will assign a unique name to each arrow on the graph ("Down 1", "Down 2", etc.) I got "data mismatch" error.   string highArrows[]; ... for (j=0; j<=highPicksCounter-1; j++)    {    ArrayResize(highArrows,highPicksCounter);...
  iHghest HELP! (2)
Hello my brothers. I'm trying to make a indicator. iHighest = 20 bars to get the highest price. Now:   Expected:     What is wrong?? :(((  thank you so much! double UpLine[];  void init()   {   SetIndexBuffer(0, UpLine);   SetIndexStyle (0, DRAW_ARROW);   SetIndexArrow (0, 159);...
Hello everybody, I know there are already a lot of topics like this but I don't understand them. How can I get all OpenTrade ID Numbers, to make particial close if the price if above or below a specified border? Greetings and Thank you! 
Hi,   I have an indicator with various parameters. But one line isn't functioning as intended:   MathAbs(iHigh(NULL, PERIOD_M1, iHighest(NULL, PERIOD_M1, MODE_HIGH, 11, 0)) - iClose(NULL, PERIOD_M1, 1+i)) > MathAbs(iClose(NULL, PERIOD_M1, 1+i) - iLow(NULL, PERIOD_M1, iLowest(NULL, PERIOD_M1,...
I'm having internet problems at my current location and have been thinking about getting a VPS to trade. My main concern is security - not from external sources like hackers, etc., but from the stuff at which ever hosting company I get the VPS at. I've been trying to research the subject, but can't...
New article Graphical Interfaces IX: The Progress Bar and Line Chart Controls (Chapter 2) has been published: The second chapter of the part nine is dedicated to the progress bar and line chart controls. As always, there will be detailed examples provided to reveal how these controls can be used in...
Salaam; I need a demo account from a broker to get data of all commodities. I have a real account Now but it does not have them. things I want: Lead ; Zinc ; gold ; wti ; brent ; sugar ; dollar index ; copper .... thanks
  Max of 10bars (2)
Hello!! how to know the maximum value of 10 bars?   Thanks people! =) 
  Ema of Previous Bar (21   1 2 3)
2016.08.02 13:00 Indicator USDCAD,H1: USDCAD H1 Ema20:Ema201= 1.3105:1.31082016.08.02 12:00 Indicator USDCAD,H1: USDCAD H1 Ema20:Ema201= 1.3110:1.31102016.08.02 11:00 Indicator USDCAD,H1: USDCAD H1 Ema20:Ema201= 1.3111:1.3110 Dear All, Above show the  EMA 20 (Ema20 is current bar and EMA201 is...
Hello Im trying to copy the value of a member of an array to another position in the same array. I get the error: '=' not allowed for objects with protected members or inheritance but I dont understand why I get this. Can someone help please? Code: class COrderEntry{    private:        #define...
  Help TS MA (6)
Hello I have a problem with the TS. the closing of the position, the TS should not open another position until the two moving averages are not touching. How can I do ? Thanks for your help
I know there are classes that can be used to draw graphics on the chart, I am developing an indicator that will have lots of graphics and trying to run it becomes very slow, its not an option. So I need to know how I can use if possible the windows api to completely redraw the entire chart, put my...
Hi! I want to explicitly convert 'enum' type into 'int' type. // --- global variables ---enum TRADE_TYPE{DontTradeType,TradeType,BuyOnlyType,SellOnlyType};TRADE_TYPE Trade_type;// then I pass 'Trade_type' into function call - SetBtnText(setSparam, Trade_type);// --- TRADE BUTTON TOGGLE...
#property strict#property indicator_chart_window#property indicator_buffers 5//---Indicator Colours#property indicator_color1 clrGreen//up arrow#property indicator_color2 clrRed//down arrow#property indicator_color3 clrCrimson//SMA10#property indicator_color4 clrNavy//SMA25#property indicator_color5...
When I restart the mt4, I found that the lines I drew, they all lost. Can anyone tell me how to save the lines I drew?
As I know I can use objectcreate to add a button but objecttype no checkbox type.   How to add a checkbox 
Hello, I implemented the class CListView in my code to make a multiple line editable list (for the user to write in). Everything works well except one thing: only 1 line is selectable at a time with the mouse. Any idea how I can make it so that dragging left-click over the list, it selects all lines...