MQL4 and MetaTrader 4 - page 1003

My code is, help me to make it work. ObjectCreate("text_object", OBJ_TEXT, 0, Time[i], Close[i]); ObjectSetText("text_object", "Hello world!", 10, "Times New Roman", Green); ObjectSet("text_object", OBJPROP_XDISTANCE, 100); ObjectSet("text_object",...
[Deleted]
I have two questions. 1. I want to buy/sell after crossing two WMA on new bar but for price close prev bar. And after place an order 5minutes later if order will be still active (no transaction), buy/sell for every price. Someone can tell me how to write after 5 minutes buy/sell for every price....
[Deleted]
Hi Guys i have a question: lets say i want to loop through my orders inside a function and return a value if this condition is valid... please have a look at this code int test(){int tradecases;tradecases = 0;       for (int i= 0; i< OrdersTotal();i++) {     if (OrderSelect(i, SELECT_BY_POS,...
Hello, I have been trying to teach my to program an expert adviser for about a week. I have been following the EA template in the book for order accounting, closing orders, and opening orders but implementing my own strategies. However, whenever I try to back test it stops right after it collects...
[Deleted]
  Test Results  (5)
After completion of a Test Run using the Strategy Tester, how can I export the records from the "Results" tab from the "Tester" panel of MT4 into a "CSV" formated file?
[Deleted]
  Arrow indicator don't work!  (12   1 2)
Hello, I tried to modify an indicator with my parameters . I want an up arrow when MACD < 0 and become greater than 0 and vise versa. I juste modify iMA with my iMACD. Now there's any arrow on the chart. Thank's pgforex //+------------------------------------------------------------------+ //|
to code natural logarithm ln (x) is MathLog (x) I need help on how to code log base 10 (x) fuction? Thanks in advance
[Deleted]
I am a bit confused. I ran a test on my EA (set deposit $10,000 on EUR/USD, every tick) and at one point the test was terminated due to a "Stop Out" error. I checked the account balance thinking that the resulting losses wiped out the account, but there was still a $9,300 balance in the account at...
Can anyone be kind enough to code this: 1) To trade like a RAT is to ALWAYS trade in ONE DIRECTION - either LONG or SHORT. Once you pick a "team", you can't switch. 2) The "within 20 pips of the daily high/low" is the BEST possible entry to get the maximum run BUT the RAT REVERSAL entry works...
[Deleted]
Hi everyone, I'm new to mt4 and EA world and I have one question about optimization and dates settings. I have been programming and backtesting an EA with Dukascopy's ticks data (I use Tick Data Suite). Once the EA optimized, I get the best parameters and I can set them directly by click right and...
[Deleted]
Hi, I am importing minute data from alpari, then using the period converter to create all the other timeframes. Instructions at http://www.earnforex.com/blog/2008/01/quality-metatrader-historical-data/ . This all seems to work smoothly and I can view the data fine in offline charts, however when I...
Hi, I organize an FX game with hundred of Demo accounts. I want to make update ranking report on web regularly and I want all works should be done AUTOMATICLY. I use Multi-terminal but it is only allow to connect maximum 10 demo accounts at a time. I have idea to make an EA that can auto login MT4...
HiI would like to make my first EA. Is a simple tactic:When the par EUR / USD with time 1H and the price crosses or equals the SMA50 and SMA100 is above is buy signal .... If the price crosses or equals the SMA50 and SMA100 is below sellAt the moment only try that the price touch the moving average...
I am running Windows XP x64 OS and when I optimize my EA program using a year backtest, it stops within 1 week. What would cause the optimation to initiate a premature Stop Out?
[Deleted]
  EA Evaluation  (1)
hello there i've finished my EA development and i've started to test it on history data and i want to get an idea of what consider a good EA from history result prespective. two years backward is enough for testing? what is a good profit factor should be? what is the min deals per mounth worth...
  The Operator "return"  (23   1 2 3)
Hello, I need some help understanding the use of "return," or more broadly, how to terminate the current function and make the EA execute the next one. The only thing I understand about "return" is that it stops whatever function the EA is currently executing and restarts from the very beginning (eg...
I'd like to auto generate a COMPLETE and permanent trading journal that records ALL aspects of every trade, including indicator values and EA settings etc. This is distinct from MT4's journal and more akin to a traditional trading journal that one keeps a permanent records of all the information...
I need to implement the original code for: PriceBasic = iMA(NULL,PERIOD_M30, BasePeriod,0,MODE_SMMA, PRICE_CLOSE, 1); I code as following: sumN1 = 0.0; for(ij = BasePeriod; ij >= 1; ij--) sumN1 = sumN1 + Close[ij]; SMMA1 = sumN1/BasePeriod; TDIBasic1 = (sumN1 - SMMA1 + Close[1])/BasePeriod;...
[Deleted]
anyone ?? but for free charges.
Hello, I want to use History file to manipulate candle data, write it to a History file, and after that use in technical indicators, from script/ea. The History file writing is Ok, but the system does not want to read and synchronize data automatically from it if I call an indicator from the code....
Hi! I have been trying to make my EA change the Stop loss value if the current trade almost have reached it's target take profit level. I have not yet found a way to do this. Can you guys please help me? One of the codes I have tested is this, but this code makes the absolutely last trade on a...
[Deleted]
Hi Guys, As I know that MT4 is not capable of back-testing of portfolio, hence I'm thinking of creating a matrix to store the data needed for other currency pair, output the data to some other files and manually do the backtest What's the correct way of doing this? use if(IsTesting()){ //store data...
This bug is from more than 2 years! I use Windows 7 64 bit. When try to copy code from mql4 code with CTRL- C in metaeditor it is crashing at 80% of time. Please fix it. Problem signature: Problem Event Name APPCRASH Application Name:...
I like to know how I can make this picture immediately in the right size This is necessarry for publishing in CodeBase If I open the inputparameters of an indicator I do not know how I can make directly a picture of the chart So I wanna know how to do this the best way for publishing of pictures...
I try to do a random choice between two values​​, as shown below. The problem is that sometimes the value is not updated timely and the new value instead of using new uses old and new open order is wrong. Interestingly, then is updated, but it is too late. Where could be a problem? I trade on...
[Deleted]
can anyone help me to fix email alert to this indicator . i need this indicator email when signal popup . i need your expertise pls help me . i attach the indicator together. TQ
hi,all does someone know what the problem can be. one of the custom indicators doesnt show correctly in metatrader 4 at my home computer. on my vps-server it does show correctly. so it is not the indicator,something is blocking the indicator at my home computer. what can it be. it is not the...
hello how many maximum metatrader application can run on pc ? now currently i run about 14 metatrader on pc . If i add more the new metatrader just wont launch what should i change so i can run more metatrader maybe around 30 ? i use windows xp with 3gb ram and i3-2100 intel processor i run...
Hi all. My MT4 for Android was just automatically updated to build 434. After the update it looks like it is always offline. Traffic 0/0, no servers, point disconnected. Can you please help? Thanks!
Is that possible write a EA which can aviod every Evens in economic calendar??