MQL4 and MetaTrader 4 - page 1214

[Deleted]
Hi everyone. Can anyone help to make this changes to this indicator please.First of all the session open price must be show a line in the actual session, but the price must be show on the price bar, and when a new session start, a new line must show on that session and on the price bar must show...
Hi, I would like opening some orders form my office but the network rules are blocked :( and Mt4 can not running :( :( in fact. the HTTP/HTTPS rules are open. Any EA for accepting an order from HTTP/https webpage ? Regards, S.T
Hello, I want to draw an old saved value on indicator, therefore I have to calculate the indicator-loop backwards and not as normal: for(i=0;i<limit;i++) I tried it like that for(i=limit;i<0;i--) but it doesn't work. Any idea?? Thank you!
[Deleted]
If my expert is calling a function on an external dll, and this function returns a string (char *) allocated on the dll How can i free the string resource after the expert is done with it
[Deleted]
Hello, i have a question about the timeframe of iCustom。what's it indeed in multi-timeframe? For example,there is a custom indicator name MyIndicator in EA, and the timeframe is set to 30 mins,please see below。 iCustom(null, 30, “ MyIndicator ”, ..., int mode, int shift); Now, i add this EA to 1...
Anyone knows if there is a multiple time-frame offline "second" chart? Where I can adjust the time-frame to any seconds? i.e. 1 sec, 5 sec, 30 sec, ... etc Thanks!
Be patient, this is my first practice account and I am still reading daily about how everything works. I have a question about S/L . I placed a trade yesterday to buy the EUR/USD and was incorrect in my decision. During the day, my P&L was negative -7000ish, but the bad EUR/USD trade i had placed,...
[Deleted]
Hello, i have a question about the OrderSend()? how can i open an order in different pairs in the same time For example if EA is executed in the GBPCHF and want that the same EA open order in the EURCHF in the same time?
  double entry  (11   1 2)
Just a quick question Something weird happen to my EA, it is entering the same position for 2 times which this had never happen before. The only changes is my EA is compile with version 227 and MT4 is version 225 Could this be the problem?
[Deleted]
  Magic numbers  (4)
Hi, I have a question about magic numbers. I have my own EA which had unwanted behaviour one day which resulted in large losses, but I wasn't able to repeat this to make sure what the reason was. My question is - if I have 2 orders open at once, one on let's say EURUSD and the other on GBPUSD and...
How to take sample of the last 60sec in 1 second interval. (Assuming that all predefined variables' values historic data include some kind of time value - correct me if they don't) i.e. (the date and time now is Dec 18, 2010 @ 12:30:27') D'2010.12.18 12:30:27' price at time[0] - (price at time
Hi guys, I will apprecite if someone knows a MA cross EA where the MA periods are parameters . Thanks in advance
Hello, and thank you all for this great forum and Advanced Elite section. It's well worth the money. The reason for this my first post here is that I feel that my system is pretty much complete and now I'm trying to find a way to automate it so I don't have to spend so much time in front of my
Total newbie here, I'm teaching myself to program using the MQL4 book. I've coded the following to give alerts when stochastics cross back from overbought/oversold levels. How can I adjust the program to only get an alert at the end of the bar and not per tick? Any help will be appreciated....
Dear all I have difficulty in translating my idea into an array. I want to use "CCI value cross 0 upward" as start of an array, recording all turning points of high (i.e. high[1] > high[2] and high[1] < high[0]) and low, and use "CCI value reaches 100" as the end of that array. After that, I want...
Hi! I am using the following loop to execute trades. The first two if statements fire, the second two do not. I was wondering if anyone had suggestions on how to get this working   for(int i=1;i>= 0;i--)   {     if(ma - ma2 <= VarianceSell)       {      res=OrderSend(Symbol(),OP_SELL,0.01,Bid,3...
Hi, There is a free C++/C compiler program Dev- C++, you can download it from: http://sourceforge.net/directory/desktop/windows/development I have the question: Till now I have never build my own DLL for Meta Trader 4. My question is: should I use Project C or Project C++ to build dynamic DLL for...
[Deleted]
Hi, I want to use Ninjatrader to generate trading signals and then pass the signal to MT4 to execute the trade. Here is how I plan to do it: 1, I wrote a custom indicator in Ninjatrader that issue a buy signal when the conditions are met, this indicator will also create a "buy.csv" file in the...
double aprice =NormalizeDouble(1.33083,4); double bprice =NormalizeDouble(1.3312,4); double abdiff = aprice-bprice; if(abdiff == -0.0004) Print("Equal -0.0004"); else Print("Not equal -0.0004"); Output: Not...
hi all iam a beginner in programing i designed my first indicator and it works pretty good but i missed some programing orders to be able to make a back test for the indicator the idea of the indicator simple is to draw horizontal yellow line as a moving support or resistsnce for the day but during
  Bar Counting  (3)
I would like to count bars since an event occurs. I used a flag showing the time of the event and I insert it on the formula iBarShift. I don’t know where my mistake is, but the result is always the same, and don’t start with 0, 1, 2… I think that is missing a looping between new data. Thanks...
[Deleted]
Hi, I'm trying to save active orders (Tickets) OnDeinit() into a binary file but is not working. (Note: The handle is created but the file is left blank.) Can anybody tell me why? Here is the piece of code: //prepare to write data...      int handle = FileOpen("orders.bin"...
The following code moved stoploss to breakeven. It sets a global variable in doing so, then to remember that stoploss has moved to breakeven on that particular trade. The code works when i have only one trade open, it will store the global variable and all functions work as they should in my ea. But...
Does anyone know how blocks of text (or pictures) can be added to a chart in MetaTrader ? The usual way only allows 1 line of text at a time. Is there an indicator or script that can do this ? Any help greatly appreciated.
Hi, I am using the http library posted elsewhere on this forum to retrieve some data from a remote server into an MT4 EA. The data is formatted as a JSON string. What is the best way to decode this data into arrays? Any shortcuts? I'm guessing not :( Thanks for any efforts to thelp
hey everyone, this topic has been brought up before. ther´s a gap in the period i´ve mentioned. i´m optimizing with alpari uk. i wrote them and i m waiting for an answer. does anyone have a solution for this?
Gentlemen admins ! Pardon the malicious offtops, but I just don't know where to ask about it. I myself have always been exclusively into robots. And I think their admirers are the only category of thinking and seeking traders. And to ask such a question to the (REAL) intuitives themselves, is like
I'm teaching myself to program using the MQL4 book on this site. I'm stuck on the following: I have coded the very simple stochastics cross alert program from the book. See code below. I'm not sure if I should compile the program as a script or an EA? I have tried both, compiled this code as script