MQL4 and MetaTrader 4 - page 1012

[Deleted]
Hi, Everything is in the title, I have a script to put severals orders in one time, I search to set an alert on at least the first takepofit of my orders with the same script, but I want to see the alert in the Terminal. Can I find a way to do this? Thanks
[Deleted]
Hello all, I'm relatively new to MT4 but was a long time user of strategy trader for you FXCM clients out there. Anyway I'm having an issue with my historical data that I just can't seem to shake. When i try to back test, it says something like this: 2012.07.11 19:43:19 TestGenerator: unmatched...
Any idea how to retrieve the order profit/loss at the close of an earlier bar in an EA?
if I sell one currency and now I want to close the operation, and make a profit,I must closing the operation with an amount more or less than what I sold. . .
[Deleted]
Hello, I have an EA that triggers an indicator. In that in that indicator I write to a file a number of values that I calculate. Then when the indicator is complete and return is passed back to the EA. I want to read that file and analyze the values that were written by the indicator. I can't seem...
Hi all, I am having some trouble with the dreaded "'\end program - unbalanced left paranthesis" error, I have been through the code several times now and I can't for the life of me figure out whats going wrong, I have attached the code in the hope a fresh pair of eyes could look at it and possibly...
I need to write MLQ4 code in which I would like to know how I can count the number of closed Order by Stop Loss. If it closed by OrderClose() command it is possible to identify closed order but if it closed by Stop Loss not sure how would I know that Order is closed by SL? I would appreciate if...
Hi guys!! I planned to use the AC indicator in my EA. I want to know if the current bar on the AC is green or red. I also found out that it is green if the current value is of higher value than the previous bar. Which also means that the bar will be red if the current bar has lesser value than the...
When I load the ea and allow it to run a few days nothing happens. But if I do a back test up to current date, trades are recorded. what does it take to get the ea to trade going forward?
[Deleted]
Hello, Has anyone already coded a function that computes the average price for open long positions and the average price of its open short positions, and would be willing to share this code? Also with the calculation of the gain / loss potential if closing all positions. Thanks, Pierre8r
[Deleted]
Hi guys, Is possible return whole array from function? My test code idea: double Array1[500];//+------------------------------------------------------------------+//| Custom indicator iteration...
Dear all, 1. Is there a way I can link up an order with a protect profit order or stop order so that I can use orderselect to find out whether this order has correspondent protect profit order or stop order opened or not? 2. Is there a way to let indicator use a result of a calculation from EA and...
[Deleted]
i tried to make an EA from an indicator..but got 3 problems: '{' - initialization expected 'EachTickMode' - comma or semicolon expected '}' - unbalanced parentheses could anyone help me with this problems >.< all the problem is at "extern bool EachTickMode = {EachTickMode};" extern int...
[Deleted]
Hello in mt4 strategy tester you can improve test credibility by changing history settings and downloading more history data. My question is does mt5 also have this option or is its tester already ensured to be credible to the max without changing settings?
I am using the "Birt Patch" in my metatrader app. In my previous version, I believe it was version 406, I had no problems with running my tester program. Now I cannot run it as I get an error message "TestGenerator: internal error because the file not opened". Does anyone out there have a remedy...
Hello. I am using the fallow code: #define OF_READ 0 #define OF_WRITE 1 #define OF_READWRITE 2 #define OF_SHARE_COMPAT 3 #define OF_SHARE_DENY_NONE 4 #define OF_SHARE_DENY_READ 5 #define OF_SHARE_DENY_WRITE 6 #define OF_SHARE_EXCLUSIVE 7 #import " kernel32 .dll" int _lopen (string path, int of); int
[Deleted]
  Creating a positive IO  (242   1 2 3 4 5 ... 24 25)
By popular demand: Positive mathematical expectation (PEM) over a long trading period ... the definition of CSI and its options; is it even possible? in what ways can it be created? Examples of systems with positive expected payoffs; why most traders cannot create it; what prevents them from doing
I need to write each row in File 3 (below) to a new file (File 4) if the Column 2 value in the row from File 3 is found in Column 4 in File 1 or File 2. The first row from File 3 will not be placed in File 4 because Black is not in Column 4 in File 1 or File 2. All other rows in File 3 will be...
[Deleted]
If you allow a drawdown of e.g. 20%, what is the purpose of the remaining 80% of the account? In this case, open an account with 20% of all funds and work for all. Trading with a max drawdown of 20% of the total amount available and trading with a drawdown of 100% of the total amount is one and the
[Deleted]
Hi, my problem is seeing from screen:
  Bid, ask, other  (4)
Hi, when putting a buy stop order I'm in doubt about this situation: I want the stop price to be High[1] + 1 (one pip). What I don't know is which price does High[1] give: is it the bid, the ask, the average between the two, or other? The same thing for going short: Low[1] -1 (one pip). Which price...
[Deleted]
Friends, when we use NormalizeDouble function with 4 digits, I want to know whether the price say 1.55675 will be rounded to 1.5568 or 1.5567 which is correct? if the price is say 1.55453 then will it be rounded to 1.5545 which means last digit 5 and above will be rounded or not ?
[Deleted]
  Metastock to Mt4  (2)
The code below is metastock format, Can someone help to convert to MT4 ?  it is called Bull And Bear Balance Indicator by Vadim Gimelfarb   Regards     r1:=If(Ref(C,-1)<O,Max(O-Ref(C,-1),H-L),H-L); r2:=If(Ref(C,-1)>O,Max(Ref(C,-1)-O,H-L),H-L); bull:=If(C=O, If(H-C=C-L, If(Ref(C,-1)>O, Max(H-O,C-L),...
this function calculates the maximum down correction between 2 points could any one please reverse it,, to calculate the maximum up correction double getDif(int X0, int X3 ){   double maxdif;   int P,B;   for(int i=MathMax(X0,X3); i>=MathMin(X0,X3); i--)   {      for(int p=i-1; p>=MathMin(X0,X3);...
Hi all, I have come up with a way by using "Bars" function. When a trade is triggered, I will set a integer count with the bars function (e.g. a buy trade is triggered in bar 122, hence the count will be 122) and when my criteria has being triggered again, I will call the bar function again and...
Can I modell when something happens on H4 with ask and bid, or maybe by comparing price on H4 with price on lower timeframes as M1?
Hello All. I use a to save .csv files in Experts/Files in C folder. For this, I need to use a top level, Administrative lever to save in C folder. But I want to use the DDE to passa values for an applivative that I use to analyse the traders. But, DDe only function in non top level, non...
  Spread control  (2)
Hi. I am look for the EURUSD and the spread (Ask-Bid) is always 5 pips when I run the script. Can I use the real spread be, or defined it ? Thanks.
Hi, I have found a few pages around claiming that the default stochastic indicator for MT4 is incorrect. Is that REALLY true ??? Is there a broad consensus on the issue? I could not find enough people talking about this to be completely satisfied with a concrete answer. To try and check, I re-wrote...
  Grammar Snob?  (4)
I understand this is not a typical post. The majority of individuals perusing the MQL4 threads are focused on script and strategy. While that is all well and good, am I the only one that is horrified by the grammar and writing style of S. Kovalyov's book titled 'Programming in Algorithmic Language...