MQL4 and MetaTrader 4 - page 911

Hi All Ignore whether this check is actually a valid way to go short :-) Can any one spot what's up with this code, I cant figure it out: if(dbMACDDivergence_Bar1 <= dbDivergenceShortSetting) { //short conditions met } Where dbDivergenceShortSetting is set to -0.3 the aim of the check is to
Hi there When one uses the ordersend/orderclose command, I know that ordersend returns -1 if it fails, and some positive integer if it succeeds, we can store this in a variable called ticket. when you use orderclose, that can return true or false to indicate whether the close command succeeded, but
Preliminary Announcement of the New MetaTrader 4 Build 491 New MetaTrader 4 client terminal is being prepared for release. Terminal: Revised one click trading system: When One Click Trading mode is enabled, the trading dialog is closed right after a successful operation. In case of an error, the...
Hi: Can anyone explain what's the meaning of an OrderSwap in a forex market please? Also, in the mt4, how can I get the pipcost for a single pip please?   Thanks  
when i load mt4 platform i have to recompile ea's to work..otherwise the ea's placed on charts won't work...
please who can help explain this?......It is possible(good) to program about five(5) algorithm systems in just one EA. For example; if i set all the setups to 'True', the EA will trade all separately when their signals matures. or if i like i can choose some, set them to 'True' & set the rest to
[Deleted]
To sell short on next bar - how would I manipulate the following or is this the right way to go to sell short on next bar? OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"",300,0,Red) OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES) Predominately I would like to sell short on next bar...
can we use java for making expert advisors?? seen some post and downloaded files but not able to understand how to use them seen this--https://www.mql5.com/en/forum/121466 page 4
Hello Forum, hope someone might help me clear up a little confusion. Was trading manually yesterday and noticed that on occasions certain candles appeared to have a different final appearance than I would have expected. Specifically and I will use the example below, I am not sure how the brokers...
[Deleted]
I am currently working on making my EA able to look at the ADX exactly 20 minutes ago.  This is a continued idea from https://www.mql5.com/en/forum/144585 but I have worked over the weekend on this and think its appropriate to open another thread (if I'm wrong here, sorry administrators) My code is...
[Deleted]
Hi everybody, I have downloaded the demo version just to try currency trading. I can create orders but when I go to choose the type of currency, in the grey box, nothing shows up. Also in the Market Watch all my symbols are grey, not black like I am seeing in many pictures. Could someone direct me...
[Deleted]
hi all maybe this is simple but ... im trying to return the values of bars in the strategy tester in a similar way to the way you can do this on a live chart. i.e.  if i want to return the high for the most recently closed bar in a live chart it would be something like:    double myVariable =...
[Deleted]
Hello, I am trying to establish the code for Market Position if flat, short or long could anyone help me in this? How would you workout if the Market Position is flat, short or long - what calls can be made? would it be Order.... Thanks in advance. Peter.
Hello to all, I am looking for a demo mike with a historic length in m15 to prove(try) a strategy since the demo that I find only allow me approximately 4 months of record. I hope that someone could help. Thank you
https://www.mql5.com/en/forum/141967 int start(){static datetime currTime;if(currTime==Time[0])return;currTime=Time[0]; //Get Signal //Trade  } the above link show the example of time condition is used,but my ea used a signal based on current price, so it may continue to have signal, then no signal,...
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...
[Deleted]
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);
[Deleted]
  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.
[Deleted]
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 
[Deleted]
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?
[Deleted]
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 = true ;
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,...
[Deleted]
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...