Download MetaTrader 5

MQL4 and MetaTrader 4 - page 52

To post a new topic, please log in or register
Im new to Forex on the MT4 platform so this is a demo account, the green arrow is where i placed my sell trade but it ddnt take profit when it hit the take profit line.There are two candlestick that hit my take profit twice so im very confused .Please help
I find the highest value and find the name of the pair by comparing the EMA. What's the problem with the code below? There is a warning to ‘ implicit ’ from ‘ number ’ to ‘ string ’. Is there any kind of a function that can be found out from any pair? int i; int cnt, ticket, total;     bool...
I think they are the same, right?
  Modify orders (5)
I want to modify stop loss and take profit to zero in hegde any one explain please how it is possible
Hi, does anybody know what error number the mt4-server returns if an order already has been closed and an EA tries to close 'the ticket' as well? MT5 does have: 10036 TRADE_RETCODE_POSITION_CLOSED The position with the givenPOSITION_IDENTIFIER has already been closed Mt4 does not know this kind of...
Hi all, Trying to get a custom indicator to load in an EA, but keep getting . This note only shows up in the journal after I open the chart, but I know the indicator is not working during the test. The custom indicator has no problem working when attached to the chart on its own. Everything seems to...
void Drawing( int Shift){   double val,Dval;   val = 5 * (Mart[Shift] - Mart[ ArrayMinimum (Mart,cPeriod,Shift)]) / 9 ;   Dval = 5 * (Mart[Shift] -            Mart[Shift + 1 ] +            Mart[ ArrayMinimum (Mart,cPeriod,Shift + 1 )] -            Mart[ ArrayMinimum (Mart,cPeriod,Shift)]   ) / 9 ;...
#define KEY_LEFT           37  #define KEY_UP             38  #define KEY_RIGHT          39  #define KEY_DOWN           40  //+------------------------------------------------------------------+ //|                                                                  |...
I'm trying to build an indicator that will alert me when a candle reaches a set size across multiple currency pairs and timeframes. I managed to get it working across two timeframes on one currency pair but have since modified it (see code below). I have searched the forum and managed to get some...
Hello guys, I'm new to this group and i need a hand to fix an indicator I make binary options I'm using MQL4 and a very nice indicator I found in the site, But I have many false signals. Use Tipu MACD + indicator, and I would like to add to remove false Parabolic SAR and ADX signals. Can someone...
I developed a computer program for Metatrader4 and worked with specialists to create a prototype that implements the innovative strategy.The product is further developed as a Creative Commons right, whereby the current version is issued as an applicable programming code for 15.- to interested...
Why when I use this code to sound an alert it behaves okay and sounds only when the statement is true. #property indicator_chart_window   // External Input Variables extern string SECTION_A  = "*** Arrow Color Settings ***";input string SoundFile = "alert.wav"; input bool playsound = false; // Play...
Hi there, does anyone know if theres a version of the Dynamic Breakout Box Indi with push alerts? Couldn't find it anywhere. Thanks!
I am trying to implement a function that looks back a number of candles and then finds the local minimum price and the moment in time they happen. I am not sure if I understood correctly the behavior of iLow.  So my iteration may be wrong. If I call this min_local(PERIOD_H1, local_extreme,...
  Excess Printing (28   1 2 3)
I only want this to print the Spread to the Experts Journal when it places an order when the spread is low enough. Now it prints one every time (their is a Tick?) and more annoyingly, makes a sound. I want to fix it, not just eliminate the sound (< 8) Thanks for any and all assistance....
Hi, Need a little help. Trying to find the code to use for the issues i have. Example So here is an example for a buy. I manage to get the rules to open order and take profit. so i'm trying to find a rules for the StopLoss. Thank You {    int err;       for(int i = 0; i < OrdersTotal(); i++)...
Hi, In my algo I just want to check if the close price crosses over or under the SMA. My code look as follow: ...  double MAkurz = iMA(NULL,0,MA_kurz,0,MODE_SMA,PRICE_CLOSE,1);......   if(NeuePeriodeBegonnen == true)     {      // Buy Signal      if(Close[0] > MAkurz && Close[1] <...
Hello !   My name is Sima and I'm new in this community!   I use <deleted> and I want to set an pop-up alert every time when a yellow dot appear in chart, like in this video .  Can anyone help me with this, please?      I uploaded it for anyone who want to try it and I hope someone will help me...
When I read the log file I could recognize that  the Custom Indicator is loaded and then removed.  Again he is loaded and removed. Then he is loaded. Enclosed you see a screen shot. What does that mean ? 
//MODIFIED VERSION //--------------------------------------- #define KEY_LEFT 37 #define KEY_UP 38 #define KEY_RIGHT 39 #define KEY_DOWN 40 //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void...
I registered to a signal service on Friday and it worked. My MT4 synchronized trades for that day. Today the MT4 cannot copy the signals for no apparent reason. I can see my signal services has already opened trades today but All am seeing is this message "Signal - connecting to signal server". I...
hi friends Is it possible to draw Vertical Lines using buffers in a custom indicator ? thanking in advance for your guidance
Hi all I have question about how to coding in order to count OrderSymbol() I open trade  buy  USDJPY ,EURUSD ,AUDUSD sell  USDJPY ,AUDJPY ,USDCHF I want EA to count only 5 pairs but my EA count 6 pair. if that same pair just count 1. Please kindly help I don't know what to do. This my code. int...
Hi guys Please find some trouble in the code Receive a double value through a function called " UpTrend ". Each bar shows a number of digits such as 0, 9, or 1.1.0722. The former is 0 and now tries to catch only the moment when tick is not zero. ex) 0,0,0,0,0,1.0684      Buy Please find the...
hello everybody i am trying to program an expert advisor using parbolic SAR indicator  and i have some tiny problems that affect the result in a huge way 1- i want the order open price to be exactly the open price of the candle (the problem : there are always delay in opening price) as you can see...
Let's say my mini account has margin of $10,000, and I want to risk 2% on the next trade (that is, simply use $200 to buy <some amount> of contracts). [I realize this is a limited view of "risk". I'm not interested in stopLoss pips, or profit targets, or whatever.] Using MetaTrader, I get the...
Hi, I'm very new to mql4 programming and I can't figure out how to adjust my lot sizes for different brokers that have different LOTSIZE and LOTSTEP values. The code below is an excerpt from an order script that calculates the lotsizes used for each trade based on inputs for my stop loss, spread...
Vytautas
Hello, i wrote my EA. now to finish it i need just to count how many lots is used total from active orders. So maybe you have ideas what function should i use to get the total lots used at the moment from active orders. for exmp. order nr: 1.0.01 2.0.02 3.0.03 4.0.05 so i need a sum of all theese, i...
Many Articles has mentioned that semi-log scale on Y-Axis provides more accurate data if Fib Retracement and Extension are used and also better for trendline and channel lines. Is there a way, code or script that allows me to change my scale on Y-Axis to be Semi-log? Thank you.