MQL4 and MetaTrader 4 - page 766

To post a new topic, please log in or register
Hi, can anyone show me what is the difference between == and >= ? Code 1 Using >=: (This Work) int ticket;  if(iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_LOWER,0) >= Close[0])    {     ticket=OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);     if(ticket<0)...
Hi can any please tell me where I can open a paper trading account that feeds live data and allows me to apply my MQL4 programs? Thanks much!
i am trying to set my indicator scale value (vertical y axis values) as an external variable by changing the values of these ( #property indicator_minimum 25 #property indicator_maximum 75 ) preprocesser directives in the body of the program. so far i have:...
Hey guys can you plesae help? I need an indicator which shows yesterdays high and low value Also a pivot point indicator which shows also mid points and historic main points. Is it possible to show a column for the pip values as well as for the price values in the Terminal window? Thanks in advance...
1.ma settings: i need 2 mas,ma1= period 3,shift 0:ma2= period 5,shift 0: both simple,close. 2.i need moving average oscillator(osma). when 2mas cross above/below and osma cross above/below 0 line i need popup alert(buy/sell).and at the same time i need arrows on chart candles,if candle moves,arrow...
hi, I have the following code in my script to display all of the closed order on the chart but I keep getting Trade_Arrow2 to return sometime the wrong arrow (The standard one Red pointing to the top). In other display orders, everything is fine. Can you help please ? // get the total number of...
  OS for MT4 (1)
Hello, Can MT4 run on these three OS: Windows 2003 32-bit Web Windows 2003 32-bit Standard Windows 2003 64-bit Standard ? What about CentOS? Thanks
Hi, I want to be able to draw 3 lines in example 1.00, 1.25, 1.50 and then move them all at the same time. I mean that instedd of just clinking at "Horizontal line" and draw 3 lines and evry time I want to move them I need to move then one by one I want to be able to move them all with the same...
Hi, What's the difference between calling "iSar" in EA and calling "Parabolic" indicator provided within MT via iCustom? They seem to do same thing?
Hi! I'd like to write an expert advisor which would execute my limit orders at every whole hour, for example at seven, eight, nine and so on in the morning. In backtest, my robot has been profitable when i tested it with "prices only" method, but with "tick" method it hasn't really worked the way i...
Hi, anyone could help me think out this problem, I'll be very appreciative. I've double-clicked on the 'Charts' toolbar (the one that allows you to choose candlestick/line charts and zoom in or out) and the toolbar pops out by itself as a window. How can I reinsert it back into the main window?
Is it possible to change the delimiter from semicolon to a comma? I am exporting data to a program that will not recognize the semicolon.
i am researching this site for somebody else. we are looking for specific capabilities including the following. - ability to test automated trading strategy on canned data. - ability to test automated strategy on live real market data. could somebody relatively knowledgeable about what this site...
I currently have installed on my PC a number of different MetaTrader programs and am typically copying indicators and EAs from one program directory to another MetaTrader program directory. What I have noticed is that when I open a program to edit, within the MetaTrader editor, sometimes it is...
I am currently testing an EA that contains a custom indicator. The custom indicator has a 0 value for the time interval so that it computes off of the active chart. I currently have a 15 minute chart open with the custom indicator on the chart. When I ran the EA through the tester, I ran a number...
Hi experts, I create two EAs 1 for Long of currency pair EUR/USD and 1 for Short of EUR/USD. So, I create a method, that should change every ten minutes the StopLoss. However, for the Short-side it works, but for the Long-Side I get always the OrderModify Error 130. I do not understand why? I use...
Dear experts, 1/ FIRST PROBLEM: My using indicator will draw many vertical lines and horizontal lines so to keep them in order I want to delete all these lines right after I added it (int INIT phase) then let it draws again (int START phase). But in that INIT phase, indicator can't delete all...
Hey guys, I found an interesting article on how forex rebates can lower your transaction costs. I think the article can be beneficial for almost all you forex traders out there, so I’ve posted it below so you can take a look. Basically, the article lays out exactly how forex rebates work, how they...
I am struggling with retrieving a single data value from MySQL. There are quite a few samples around both for MT4 and MT5. I have tried a few of them and they work. But they all retrieve complete rows of data from MySQL. I want to retrieve a single values with qualified SQL-statements. Something...
void init(){while(WindowHandle(Symbol(), 0)==0) Print("wait until chart is fully loaded");if(WindowHandle(Symbol(), 0)!=0) Print("chart is now fully loaded now indicator can start counting");return(0);} i try do that and my mt4 crashed, any one could help what i did wrong ? (the goal is, indicator...
  Trigonometry Memory Aid (11   1 2)
Howdy all, I'm passing along a quick and easy little memory aid for Trigonometry that I picked up in Machining school decades ago. To this day I can instantly recall it and do all Trigonometry with it. All of these equations are for ^Right Angle = ^90 degree TriAngles. If the Triangle you need to...
Hi all, If you want your ea to automatically determine the broker type (ECN or MM), is it save to say that if stoplevel or freezelevel returned by marketinfo is 0, you're dealing with an ECN broker and therefore you have to add your stop loss and and take profit with ordermodify? thanks!
using stratmans mini charts, i found that it is posible to reduce the space between the bars on the chart, without reducing the bar size itself (or is it posible to resize the bars without modifiing the size between the bars). in mt4 the standard space between bars is a little too large for me. so i...
Is there an idicator which displays the vertical grid setting in MetaTrader4?
Hi, I am getting errors showing "EAName EURUSD, M30: EURUSD, M30, ticket# SELL TrailingProfit err=0, 1.3804" and it appears that the EA is not modifying the SL for the selected ticket Could anyone please advise what seems to be the problem, many thanks!!! init(){if (Digits == 5 || Digits ==...
I have spent hours searching for code samples showing how to retrieve a single value from MySQL. All samples are returning complete rows. They work. But I want to do qualified retrivals like "Select xxx from table1 where yyy equals zzz". Tried a few variations but could not get it working
Could someone please help because I am planning to switch to windows7. TIA
I tried to buy a lot of size 4.024 . I got an error because my broker will only allow lots of in increments of .10 If I were to buy a lot size of 4.024 how can I make sure I it will automatically round to 4.000 or if I were to buy a lot size in my EA of size 4.386, it would round to 4.40. what...
I have some questions about MQH files in Meta Trader 4. I 'v never used files like that in MQL4 programming and I would like to know: 1/. What for are the MQH files? What can I obtain using this files? 2/. Is it possible to import the external DLL library into MQH file and next include this MQH file...
Is my understanding correct that someone could compile a different language within a general purpose IDE (Integrated Development Environment)? Example compiling Mql4 from Note-Pad++, I think it'll be a matter of setting the path and checking error messages in windows shell...But I'm not sure if it's...