MQL4 and MetaTrader 4 - page 1626

[Deleted]
TRailing stop code ; for(cnt=0;cnt<total;cnt++) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if(OrderType()<=OP_SELL && OrderSymbol()==Symbol()) //&& OrderMagicNumber()==MagicNumber { if(OrderType()==OP_BUY) //<-- Long position is opened { if(Bid-OrderOpenPrice()>TrailingStop*Point &&
Hi, I'm unable to upload file for championship. My filename is aks.ex4. But it shows error as only latin alphabets allowed. kindly help.
If I try to express a condition in which a downtrend of 15pips aroused , is a following code right ? I think this code will be useful when we try to catch a trend of which a startingprice is unspecified ( for example when we begin the trade newly) . int y; if( Low[0]==Bid &&...
I have a 61 EMA line and would like to input a line 20 pips above and 20 pips below.  Can anyone help me with this?  Many thanks.
How far should one backtest a EA to determine potential profitability. 1 year? 2-5?more? I understand the overall nature of the market changes from year to year, so an EAthat works now might not work in the future, or might not work in the past. What are you guys' thoughts?
[Deleted]
I want to make just a simple EA based upon an indicator that has "up" and "down" arrows. All i want to do is trade based upon direction of the arrows. How do I import this data from the indicator? Thanks
[Deleted]
int TEST1 [20]; int TEST2 [20][2]; int TEST3 [20][2][2]; ArraySize(TEST1) = 20; Great for 1 dimension arrays ArraySize(TEST2) = 40; As the is 2 * 20 elements in the array ArraySize(TEST3) = 80; As the is 2 * 2 * 20 elements in the array I want to get the number of lines/records in TEST2 and TEST3,...
[Deleted]
Hi, how do you understand 50% 'Stop Out level' in Trading Terms of Automated Trading Championship 2007 ( point IV.6) ?   - Is it a disqualification in case of 50% drawdown in porfolio form initial deposit ( i.e. from US$10 000 tounder US$5 000 ) ?  - Or it is a disqualification in case of 50%...
On the website of the Automated Trading Championship 2007, the article Evolution of Trading Systems has been published. Almost one year has passed since Automated Trading Championship2006 started. The new contest of automated trading systems, Automated Trading championship2007, will start very soon....
  Window Index?  (5)
Hello, I want to create an object on a separate windows. Main Window's Index is 0, howabout other separate windows? how can I determine it's index? Thanks
[Deleted]
Hello everybody I would really appreciate the help of any of you since I have not found any explanationto my doubt yet. I am stuck with a message that is returned to me on the Journaltab of the Tester window when I am optimizing expert advisors with a big inputdata set. To be precise, when I run the...
-
Hi, I am trying to calculate the value of a point in the deposit currency so I candynamically calculate trading lots such as to not exceed my risk beyond a predefinedlevel based on my stop loss for a given trade. Can anyone help me with this info? Thanks, Sanju
Is it possible to code an Alert when both the RSI & Stochastic has returned from O/B or O/S levels and crossed into middle again. If one of the indicators crossed back over (even up to 10 bars before the other indicator) - I still want an alert to sound. Any help will be greatly appreciated as I am
Is it possible to coding an alert with a custom sound? As far I know MessageBox fuction is cannot be called from custom indicators. Thank you
[Deleted]
Hello Can someone help me how to convert EA to Script ? and also what is the difference between EA and Script programming structure ? thank you
[Deleted]
I see these functons and I want to know how to use them ?? IsTesting, HideTestIndicators : What do these mean ? What is a testing chart ? EA is running in testing mode, so what does this mean,if on a live account orders are not sent ?? Hide test indictors, where and how is this seen or not seen from...
i couldnt upload my .ex4 file. it keep prompt me the same message box. (the file name may contain only latin letters....................) in which my file name contain only latin letters. Help Needed!
Please help! I know how to import into history center many additional "offline" symbols (other from given by broker's server). and how to see them as "offline" charts in MT4. But I would like to heve a tool to compare visualy price action of any of these offline symbols in one window (as a cluster
Is there a built in way to do this with MQL? Something like, high(openorder)? Ordo I have to get in the mess of setting up dynamic arrays?
HI, I SETUP A SYSTEM FOR PAIRS TRADING, EVERYTHING IS COMPLETE, MY ONLY PROBLEM ISENTRY. FROM WHAT I UNDERSTAND, ENTRY IS BASED ON THE DEVIATION OF THE RATIO OFPAIR1/PAIR2. BUT, ENTRY IS ALSO BASED ON CORRELATION30,90,180,365 TIME FRAMES. FOR EXAMPLE, YOU HAVE CADJPY AND NZDCHF, LETS SAY THEY ALL...
What about create a competitors ranking using the Championship historical classification? Some advantages: - increase historical competition; - if EAs works, and I believe so, some competitors will remain top ranked positions; - brings even more qualified competitors and sponsors;
Anybody could help me? for example: double ma=iMa(...); How to put "ma" value on left-bottom of the main window? Thank you.
[Deleted]
I would like to ask about the time zone of the Metaquotes demo server. what is the time zone and does it implement dst. also, is the server to be used in the championship, the same serve with the same zone. thanks
I understand that the error code 1 means there is no change when compiler executeOrderModify. But I cannot understand why such code like below giving error code1 too... if(TrailingStop>0) { if(NormalizeDouble(Bid-OrderOpenPrice()...
Hi, I’ve got some variables Int var1= 12.598 Int var2 = 96.325 Int var3=12544.3658882 Int var4=9865.010144 How can I extract the last 2 characters on the right (98 , 25 or 82 etc.. ) With the function « StringSubstr »? Because StringSubstr (var1,0,2) =12 Thanks for all your help!
I currently run build 208 of MetaTrader on my computer. When the auto update triesto upgrade to build 210 it fails. Do you know by chance how to resolve this problem. I'm running MT4 on Vista Home Premium. On my other computers that run XP I encounteredno problems.
[Deleted]
I saw this code in the MQL4 documentation: ticket=OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green); if(ticket<0) { Print("OrderSend failed with error #",GetLastError()); return(0); } and I used it in my expert but it seems that this code opens...
[Deleted]
Hello, I'm new to MQL and I am trying to write a program that will open an order on twodifferent pairs at one time. For example, when GBP/USD ask hits 2.05, open a shorton both GBP/USD and EUR/USD. I can only get the position to open correctly on thepair that has the EA attached to it. On the...
(1) UninitializeReason() not always return to new launch init() what previous launchdeinit() sees, why? previous launch deinit() sees: REASON_CHARTCLOSE new launch init() sees: Script finished its execution independently (2) EA global scope memory and EA any scope static memory fails to reset to...
[Deleted]
Help with an exit. What is the code to reference data on a previous bar, for example A buy is placed at the 11:00 oclock bar. How do you right the code for an if statement to say If the close price < low of the 11:00 bar Thanks Doc