Download MetaTrader 5

MQL4 and MetaTrader 4 - page 81

To post a new topic, please log in or register
how can i state and wriite a good ea
Hi, I'm new to MT4 so apologies for the newby question. I want to set up new chart windows in the template I'm setting up and there is only a very limited list of markets I can add - how do I access new markets. I'm intereested in forex markets. I checked online manual and it only says I can ad new...
Hello,   Is there an easy way to find the indicator of an indicator.  For instance, I'd like to take a simple moving average of the RSI and display that in it's own indicator.  Can something like that be done easily?  Any example code would be most helpful.   Thank you! 
I inserted a for loop, after a cross candle condition on Moving Average 50. With the for loop, I have to try the first cross of the Moving Average 5 on 50 by 9 candles and when the cross was found, I get out of the loop and finish with buffer 1 The code does not error but does not work as I have...
Hi is there a spot here on mql4 where I can access candle pattern logic similar to the why I have identified some candle patterns in my previous code writing efforts:double O=(Open[1]);      double O1=(Open[2]);      double O2=(Open[3]);      double H=(High[1]);      double H1=(High[2]);      double...
  Refresh the chart window (29   1 2 3)
Hi, Every time I want to refresh my chart window, I click in a different time frame.And then, I chick again in time frame I was. So I get two question: 1- there is any short key I could use to refresh my chart window? 2- there is any code I could use in MQL4 in order to refresh my chart window?...
Dear Support,   I tried to create a Chart object in mql4, but I got  a 4207 runtime error "Some error in object operation." My creation code: ObjectCreate(0, "miniChart", OBJ_CHART, 0, Time[0], Bid); Is this workable in MT4?   Thank you for your answer.   
Hi guys,   I'm wondering if there is a problem with this function because it is working on some broker and other not. I tried the simpliest code to check and found out that some broker like instaforex it is not working    sellticket=OrderSend(Symbol(),OP_SELL,0.01,Bid,3,0,0,"Sell Order placed"...
Hey Guys, I know how to get specific data from a indicator in a EA. For example I use iMA to get the current data for the moving average. But I also want to visualize those data for the user. So my question is, how can I implement the moving average so that the moving average is appering on the...
I trading about 15 currency pairs, and I would like to write a method (function or class) to return the number of open orders per symbol. Any idea how can i do this? Thanks, Phil
Can I draw a line on a 4 hr chart and have it appear on the 1 hour chart of the same symbol ? Also, how to enable Global Crosshair ? Thanks
Do you have a Function of "trading at certain hours" strategy? I would like to test if EA works better 24hrs or during certain hours.  
Hi, a bit of my code: void CheckPositions(void) {     int total_orders = OrdersTotal();     for (int c = total_orders - 1; c >= 0; c--) {         if (OrderSelect(c, SELECT_BY_POS) == false) {             Alert("Can't select order!");         } else {             bool is_pending = (OrderType() !=...
Hello can someone help me with my code for the icustom function. The the original indicator is just a 50,200 ema but I want to learn how to import my own custom indicator and for this the iMA function can not be used. I  am using the built in moving average EA for testing the code, I just want the...
How do I change my demo password ?
Hello I have a fn which calcs missed daily, weekly and monthly pivots, and plots lines. Due to the lines being triggered by buttons, the calc is done in an EA, not an indicator.  I need to plot the lines to start level with the first bar of the day (daily), week (weekly, i.e. Monday 0000) and month...
Hi   i recently found a strategy that would lose a LOT. You know that kind of strategy that you can reverse and make profit.  I was working on a set of non-tick data (regular backtests)   later i tested the algo on a tick quality backtest and the results were the exact opposite !    yes the "to...
Hello All,   I have to call a function from a third party software DLL in MQL4. The DLL function definition is like this: int func_1(double** X, int rows, int cols, double* A, double *B)   When I try to import the function using above definition, I am getting the error 'pointer cannot be used'  Can...
Hi, I'm using MT4 for the first time and I can't figure out how to calculate the running standard deviation of price differences, i.e., Close_{t} - Close_{t-1} over the last N values using iStdDev? Thanks :)
Hi All, I'm trying to build an ea for binary options (i'm using MT4); I created the code using an online builder and then add few things. The ea works fine with normal forex but not for bo, which is what I'm interested in. Any suggestions to make it work for binary?  Thank you, Cronos...
Hi all, I've goggled extensively and come up empty and was wondering if anyone has come across the following issue. For Brokers that offer trading on futures, the symbol naming system is like this; #CLK5 which is 'May 2015 Light, Sweet Crude Oil Futures'. The K5 part of the symbol name changes...
I have a question regarding the below code.  It is meant to search the open orders and count how many open buy and sells their are for the correct symbol.  In this case there should only be 1 buy order open.  However, is it possible that if the OrderSelect fails to select the order at say i=0 it...
New article Cross-Platform Expert Advisor – Orders has been published: MetaTrader 4 and MetaTrader 5 uses different conventions in processing trade requests. This article discusses the possibility of using a class object that can be used to represent the trades processed by the server, in order for...
I am new to coding but I am learning about it.  I have been trying to set my stoploss to 3 different condition as follow ( Open_Buy Case): 1. My Stoploss = 50 pips if the previous close is not greater than 50 pips compare to previous bar open . 2. My Stoploss = previous bar open if the different...
Hello, I performed a series of calculations to arrive at a final percentage. The code has no errors but the calculation does not work. example: Total excursion Body candle = 36 tenths Total excursion shadows      = 11 tenths mathematical expression (100 * 11) / 36 = 30.55% Can you help me? Thank...
I'm trying to point out the candle, on M1,with the biggest volume within an hour for every hour. The results are puzzling, some do point out the biggest volume, some hours have none. Could you please help me out as i don't know where i'm going wrong with this.     void DrawMinuteDot(string dayhour,...
Hi,  i´m new to programming but trying my best. Currently i´m trying to program EA which will trade after predefined set of points e.g. open order after last trade +/- x points. My EA is working fine until one moment, When i open a trade pending order will be set +/- points only if tick will take...
Hi guys, I want to logout my mt4 account from all device that it is installed.  Can anyone help me to do that. The problem is that I don't have access to all devices and I can't logout manually. I need to do something like Force logout from all at ones.  
void LockInProfit(){   double Balance = AccountBalance();   double Equity = AccountEquity();         if ((Equity) > (Balance*1.01))   {                   CloseAll();                   }    return; }void CloseAll() {  // for (int i=OrdersTotal()-1;i>=0; i--)   for (int i = 0; i < OrdersTotal();...
Goodmorning i made a code in javascript that if i visit this page from browser it open a position in binary.com. But if i made a webrequest from mt4, it doesn't work also if i get result 200 on webrequest and 4000 error of mt4. Some one can help me?    string params="";      char data[];      int...
1...747576777879808182838485868788...1244