MQL4 and MetaTrader 4 - page 1192

I taught it would have been easier to use a bunch of variables defined outside of the start()-function. Because I'm using the same MT instance for development as well, appears like my out-start() variables are being reset whenever I compile something. I've tried taking the .mq4 file out of the...
I have a basic EA, but the init and denit is not working at all. Anyone know why? The server is not connected, but there is nowhere in mql4 document saying the init requires the connection to sever. //+------------------------------------------------------------------+ //|...
[Deleted]
Hello, i would like to know, if there is a way how to create POST/GET requests to some page? (I would like to make Online EA console). And also if there is some example of code to recieve come data from WEB server and then do something with it in program. Thanks for any comments
have the EA determine from the direction of price movement relative to the value of the entry price, decide which trade (BUY or SELL) to make ? . . I have seen some EA's while trying to solve this problem and they all so far enter a trade based on the values of indicators or otherwise, regardless of...
Dear all, I'm new into MT4 world and I was recommended this great forum. I haven't found through the search engine what I'm looking for, so I understand it must be a very noob question, sorry :(. Here I go. How can I add candlesticks to my 1m chart? I know I'm working with Alpari and downloaded...
  Convert to Integer function  (16   1 2)
Is there a function to convert a Double value to an Integer? In another language I've used I think it was called "CInt". At the moment I'm defining an integer and assigning the Double value to it, but it would be simpler if I didn't have to do this. Thanks.
I am learning MQL and writing an EA to carry out trades for me. I am new to programming, and have been working for two days now trying to work out how to solve this problem, with different scenarios and logic within the program. The problem I have is that I would like my EA to trade for me at a...
[Deleted]
I need stochastic indicator with alert I use: 4h, 30min chart Stochastic 13.3.3 Stochastic 5.3.3 Alert: when K period cross D period ... and vice versa, but only valid signal is when both indicators are crossing on same bar. I would like to have sound alert for home use, and sms alert if i am out
[Deleted]
what i would like to do is group my open orders. for example i have buy orders and sell orders. some are in + some are in - what i like to do is make an EA and show on chart different groups. 1 column has a bunch of buy orders in + 1 column has a bunch of buy orders in - 1 column has a bunch of...
  mq4 converting  (2)
The mq4 code in forex works well, but how can this code be converted to easylanguage, or C+(the basic of mq4) ? If mq4 comes out of C+ so it can be reversed.
Hi, How do you create a dynamically sized array in mql4? Is there a *new* construct? I can't even use a variable to define the array size: int totalEvents = 7; datetime events[totalEvents]; :(
OrderPrint - is it possible to send the output to another file other than the log ?
[Deleted]
Many of my charts have points where days, sometimes MONTHS, of data are simply missing. I have also wasted hours trying to figure how the MT4 history centre works. Hopefully some more experienced users can answer some of my questions. Q1) Are the chart data and the strategy tester historical data...
[Deleted]
  Programmer as a partner  (65   1 2 3 4 5 6 7)
Looking for an mql4 programmer as a partner. From me the idea - from you cooperation, comments on the idea, programming. Joint testing, refinement. If anything write to yuupi_como @ mail.ru
How would my FileOpen statement have to look if I wanted to read a tester .set file? FILE_READ|FILE_CSV, FILE_READ, or FILE_BIN|FILE_READ ?
Just wondering if someone might tell me if there is a maximum number of indicators that can be used in MetaTrader 4 at one time Like a lot of newbies I downloaded many to simply see what they do and explore, but notice that some are greyed out in my custom indicator list. Secondly, is it possible to...
In the meta editor help description of ArrayResize() it says this: Note: Array declared at a local level in a function and resized will remain unchanged after the function has completed its operation. After the function has been recalled, such array will have a size differing from the declared one....
[Deleted]
I have been having trouble sending orders and email test messages, even though I've got a connection and get data all the time. I thought my order sending trouble was because I messed up the code but I started one of the examples, MACD, and made sure "Allow Live Trades" was checked, and it still...
[Deleted]
Hello everybody! Can a robot combine two entry strategies? Example: First entry strategy is scanning the H1 interval for TRENDturn around on both LONG and SHORT side. If the result is negative than we don’thave a NEW TREND but still can be IN a TREND. Second entry strategy is scanning the M5...
[Deleted]
  maximal drawdown  (6)
i have an ea but i want to stop the maximal drwdon in % so i need a stoppoutpct! I copyied it from another ea but it doesn't work for my ea so i use the script - can anybody told me how i can use it
int A=3; int B=4; int C=Gipo(A,B); int Gipo(int a,int b) { int c = (A+B) ; return(c); } what is wrong with this function ? I can not work it out, I copied it exactly from a function written on the internet ? ? ?
Hi there, I am running the strategy tester on EURUSD H1 and it works fine. When I change to a different pair it loads my customer indicator every time it refers to it in the program. That slows things down. If I switch back to EURUSD it again works fine. Clues?
I am relatively new to MT. I am compiling my algorithms for my EA's. How many currencies and cross rates can be used to compute an indicator? Is is possible to create an EA utilizing input from multiple currencies at one time? Thanks in advance.
  Function call  (1)
//If I change c, why do Keep on getting a 0? int Crossed(double LineTop,double LineBottom,double Trigger) { static int LastDir = 0; static int CurrDir = 0; if (Trigger>=LineTop) { CurrDir=1; } else { if (Trigger<=LineBottom) { CurrDir=2; } else {...
[Deleted]
Hi All, I'm fairly new to metatrader and to programming EA's. I have a lot of experience with VB/VBA so the programming side isn't the problem, at least I don't think it is. I've written a basic EA to test my skills while learning and it doesn't seem to take the trades when I expect while running a...
How to calculate the cost in dollars of entering with 1 lot at given price ( EntryPrice ) with given StopLoss price ( SLprice ) ? double RiskPoints = MathAbs(SLprice - EntryPrice) + MathAbs((Ask - Bid));//The number of points we risk to loosedouble RiskDollars = RiskPoints * MarketInfo(Symbol()...
[Deleted]
Hello, i need a little help: What kind of variable should i use if i need it to be shared in all the symbols on which is EA attached to? (So for example i need if i set variable) bool dontTrade = true; So it will be shared for all the EA instances and no symbol will trade A little example of...
My Win Vista laptop has die for a few months now. I am thinking of getting a Mac now, either Macbook Air or Pro What are the methods to run MT4 on Mac Anyone mac user here? What are the pros and cons? 1) Bootcamp 2) rEFIt 3) VMware Fusion 4) Parallels Desktop 5) MS Virtual PC .... etc (let me know...
I found no way to automate trade or run script from outside metatrader is there anybody thinking about creating a webservice api like what marketiva has done ? http://www.marketiva.com/index.ncre?page=api&id=1. I am really thinking switching to Marketiva just because of that difficulty. I don't...
how do I get a value to 5 decimal places (double) from iSAR(NULL,0,0.02,0.2,0) ? . If I use double SARba = iSAR(NULL,0,0.02,0.2,0); I only get it to 4 decimal places