MQL4 and MetaTrader 4 - page 552

To post a new topic, please log in or register
Dear all, when I am testing the EA with strategy tester no output was produced by in the equity curve tab. I am really puzzled and waiting for your help... The setting of the strategy tester is as shown in the figure below.I have downloaded the historical data in the datacenter several times to...
Hello! I have constructed an indicator drawing 2 lines. The problem is that, one of them obtains its values from the range [95,100] and another somewhere between [-0.05,0.05]. Im not concerned with the values of the first (big) one. Im only observing its increasing-decreasing regions. So my question...
while closing some orders i have set slippage to zero but still some orders end up at different prices....how can i make orders close at exactly ask or bid as it is a scalping ea......OrderClose(OrderTicket(),OrderLots(),Bid,0);OrderClose(OrderTicket(),OrderLots(),Ask,0);
  EA between computers (17   1 2)
The following code works just fine on one of my computers.  However, I have another computer that will only place the order in the blue code. I have an Open order failed Err # 129. I added RefreshRates() before the 'If' statement.  Why would it work on one computer but not on the other? I am on an...
the attached indicator does not update value on chart. ( will not how new signal on chart until you refresh or re-attach it to the chart.) Please, can someone help to rectify the problem.
Hello everyone! This is my first post here. I need some help with the time-shifts. I have constructed an indicator drawing Green and Red bars indicating buy-sell regions for externally specified TF. Im bad at timeframe changes that's why I need your help. When the closing price for D1 comes, I need...
hI   Programers i need the code from ZERO LAG MA for put inside my EA.  thank you 
hey guys, I need help with my EA debug code to see the volume. I'm programming with the following code and the volume is not reflected in the journal tab of the EA:   if (debug) {Print ("SV", sv1, "BV", BV1, "P1", Ask, "P2", Bid, "V", Volume);} I dont know where is the error   Waiting for your...
Usually if I start mt4 indic.mq4 and it automatically compiles a indic.ex4. Now instead it happens that I do not compile and gives me a "Can not open file" in the log. Is this normal?
Hi!                                                                                                                 (Im new to this forum and dont know if its ok to add new threads for every new question).  I need to draw a "myHistogram" indicator for H4 when Im on D1 chart. How can I achieve this?...
Hello, Could you please help me to correct the following ea : double MHLong = iCustom(NULL,0,"Indicator",1000,1,0); double MHShort = iCustom(NULL,0,"Indicator",1000,0,0);  check 4last candles to know if indicator is long or short :   int i =0;    while(i<=4) {     Print(i);     i++; } if MHLong =...
Suppose I want to use a custom indicator-like a certain type of moving average- on RSI values. Then I need to set the RSI values in an array, and apply the moving average on that right? How do I do that? iCustom doesnt allow me to apply indicators on arrays.
  Get Time Code for Chart (11   1 2)
Hi, I am writing an EA and am using a Custom Indicator in order to get from an M5 Chart every 5 Minutes a value for a signal. When running the EA, it runs everytime a tick arrives. I get properly the value out of my Custom Indicator with iCustom, but I want the EA to skip the code until really a NEW...
Hi all: I am currently writing an EA based  the Zigzag indicator. As you know that, the Zigzag swing high or swing low may change as the market is going.    In my EA, I wrote something like:   zArr[1000]; zHighArr[1000];zLowArr[1000]; for (int i=0; i< 1000; i++){         zArr =  iCustom(NULL, 0,...
Dear Members, Is there a member who can tell me if I can use MT4 with my Mac? Here's what I have: Processor: 2.3GHz Intel Core i5 Memory: 2GB 1333 MHz DDR3 Graphics: Intel HD Graphics 3000 288MB Software: Mac OS X Lion 10.7.5 (11G63)  To use the Rapid Results Method I just received, I need MT4 but I...
Hello!  Is there any function that returns the number of bars on a chart for a specified TimeFrame? I mean, I dont need the Bars variable which returns the number of bars on a current chart. I need to pass 1440 for example and obtain the number of bars for a D1 chart.   Thanks a lot 
Hi!  Is it possible to draw 2 separate histograms on one indicator windows? Thanks 
Hello    I have one ea idea based on MACD SIGNAL LINE  with EMA4 CROSSOVER.Can any body help me.It was worked Indian stock and commodity markets manually.It will work in Forex also.Please help me. Sreanivaas 
Hello Everyone , I found this indicator and i want to have an EA for it I want it to buy when a green buy arrow appear and exit when the yellow arrow appear , if the result is loss so the next entry id double lot size .
Hi to all, and thanks for taking your time! I want an ADX that shows green if the ADX is rising, red when its falling...for some reason I don't know it doesn't work with  the code below...can you please assist? In the charts the bars where it changes form risng to falling ans other way around the...
It is not easy to open a buy market order above the high price. Does this happen much?   By the way, it was not a successful trade. ;-)  
Hello, In MT4, when an Expert Advisor is initialized and loaded, the init start function is executed when a tick comes in. However, this is the important part, according to this website, the Expert Advisor will only execute on the next tick, if it has already completed the running from the last...
Howdy All, Strategy tester seems sluggish running h1 strategy tester both visual or without. If I do a 1 month non-visual it will take me up to an hour just to look for open orders or make them. Wondering if there would be any tricks or suggestions. Obviously nothing is a trick bu perhaps something...
Hi to everybody, I have written an indicator in MT5 which shows the last two highs/lows in comparing 3 bars to the left & one bar to the right. It works fine. I want to do the same in MT4 fpr a friend, but I fail...and don'rt know why!? It  takes the wrong arrows, not the ones I choose - see...
Do we need to think about the speed of functions in our program structure? If code uses Trade Functions between the the part of the code that makes the decision to trade and the code that actually makes the trade, then speed could matter. In a fast moving market would the following program be too...
  EA Writing (1)
Can anyone please code this EA, i have given here logic for EA. Logic- 1) We can choose Starting position as BUY/SELL or BOTH. As EA starts it will take BUY/SELL or both positions at market level. 2) Adjustable Stop Loss and Target Price. 3) Martingle Money Management (mm)- Adjustable 4) If SL/TP...
for some weird reason the intervals of the charts are double what they should be . For example: M30  returns times 00:00, 01:00, 02:00, 03:00 etc (1 hour intervals)  H1    returns times 02:00, 04:00;06:00;08:00 etc (2 hour intervals) H4    returns times 04:00, 12:00,20:00 etc (8 hour intervals) its...
Hello, I want to test an EA in tester with my own tick data. What I did: I recorded ~3.2M EURUSD ticks the last months. I ran simple_csv2fxt script with this tick data and it created a EURUSD1_0.fxt file and a EURUSD1.hst file. The script tells me that it added 1.7M ticks and finalized 54000 bars. -...
I'm trying to figure out the best way to change something like this, 21345.6789 to this, 21000. NormalizeDouble seems to work in decimal places but I would like to round down to the nearest 1000s. I'm trying to use DoubleToStr but it seems like there's got to be a better way.
  Code error (12   1 2)
Hi all I am currently trying to find an error in my code.  I've been debugging this part of the program for some time by now, but I've not been able to find the error.  It must be a very simple one, as the code is very simple, as you can see below.  The problem is that when I try to calculate...