MQL4 and MetaTrader 4 - page 183

To post a new topic, please log in or register
Please somebody help me on this one.  I want it close the current order and open a reverse order when an opposite signal appear. but This EA close the order and no new reverse order. please give me some advice and some code to correct it...
Hi there,   i have a script  that i want to be executed each time a new Profile is loaded (the script will update the chart-templates). I could not find any Funktion/Event to do this. can anybody help me out here?   thank you SautaRoc 
PLEASE help me. I have opened a demo trading account with a broker and I used their link to download the met4 platform. All seems to be OK except for the fact that when opening the data folder the MQL4 folder is not there. As a result, I cannot load indicators or EA 's. I am using windows 8.1 latest...
')' - unexpected end of program Scalping.mq4 '{' - unbalanced parentheses Scalping.mq4 return value of 'OrderSelect' should be checked Scalping.mq4 return value of 'OrderModify' should be checked Scalping.mq4 extern int MagicNumber=0;extern double Lots =0.1;extern double StopLoss=0;extern double...
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,...