Download MetaTrader 5

MQL4 and MetaTrader 4 - page 19

To post a new topic, please log in or register
Hello, I want to print the multiple and different datetime values in the Data window I started using the SetIndexBuffer but it only works with double values and it worked fine for double values What is an equivalent function to work with datetime values instead of double, so I can see those values...
Salutations! So I was tinkering with my trailing stop code template, which kinda is as follows:          if((OrderType()==OP_BUY) && (OrderSymbol()==Symbol()) && (OrderMagicNumber()==MagicNumber))  /*This*/       if((TrailingStop>0) && (Bid>OrderOpenPrice()+MyPoint*TrailingStop) &&...
hello i got an indicator which the only way to retrieve buy and sell signals from is to analyse log Alerts produced by the indicator. i've tried every other way. But i *need* to automate it. my question regards the correct way to open the log file and to analyse it. 1) is it possible to open the log...
Hi, does anybody knows ho many pixel in x-direction (size_x) does have one candle of the chart with chart_scale 5 (and 4,3,2..)? Is there a way to calculate the size_y out of the High[iHighest(..)] and Low[iLowest(..)]? Thanks in advance, Gooly PS: I didn't find anything but the descr. of...
Hello everyone, I wanted to ask how I can set up an ea to open operations only from one hour to another. For example, I would like you to open long or short transactions only if a maximum or a minimum is broken between 2 and 3 pm
I do not know where to ask but ... being in with MT5 for the last few weeks - I am really confused - why some very good coders are ignoring MT5? Just because MT5 is more developed and people are having more possibilities to make money while trading?  Or because of different programming language for...
I am looking for MT4 client terminal... But find nothing yet...! Is that really available...? Not asking about Mt4 server API...!!!
Hello Guys, I am getting error 138 (requote) only in backtesting it looks to be fine in demo acount. any clue? here is my code: #include <stdlib.mqh>int ID = 1111;bool ShortIsOpen;bool LongIsOpen;int ticket;extern double Lots = 0.1;int slippage = 3;int order;int to;int init(){   ShortIsOpen =...
I have an expert advisor which is not working right. Adding and changing some features.
Hi guys Please help me with this code. The expert opens a buy position and then SellStop. But if there is manually open Positions (market or pending) . the Expert stops working even though I did selected the orders with magic number in the Loop What's wrong in my code ??? I do not expert to deal...
Hi every one I hope you are doing well and living a happy life  I have a question : I programmed a MQL4 script to aid me in my job. It processes a .txt data file and get final report and some simple statistics. the problem is that I want to let other employees use it without being forced to set up...
//+------------------------------------------------------------------+#property copyright "Copyright 2018, MetaQuotes Software Corp."#property link      "https://www.mql5.com"#property version   "1.00"#property strict#property...
I have products in my MT4 that worked last week. I did an update of Windows this weekend and restarted MT4. Now I cannot attach EA's. It shows up in the Navigator tab under the Market and already downloaded when I look in the market tab. But I can't attach them to the chart all of a sudden. Any idea...
Hi, I am optimizing an ea TimeFrame H1 with every tick(using my own tick data & real spreads) ; it is a high-low based scalperwith relatively tight stops/profits.   After it is finished, when I go to "optimizationresults" tab and double click on a specific line to run a backtest on thatspecific set...
  New EA based on the !xMeter (693   1 2 3 4 5 ... 69 70)
Hi all, I start this thread (with Rlinac agreement) about his great tool: the !xMeter. !xMeter calculate the strength between different currencies. When I study the values on the picture below, it appears obvious that more the variation is large more it would be interesting to open a position. So I...
  Trailing Stop (4)
Hi guys then I'm trying to do the function of this This is the code But I did not understand why I do not change the order however in the function "TranlingStop " enters it (in fact I see the comment "tS") but it is not however does not perform the "orderModify" and I do not understand why someone...
Well,  MarketInfo(Pair,MODE_LOTSIZE) gives the value in base currency. Is there any way to get the value in deposit currency?
I am a little bit new in this language, but I have the basics. I want to trade EUR/USD, and my account is in EUR. I have 1000 EUR in my account. What I want: open a position with stop loss and take profit. I want to place an order with 100 euro, and I want to set the stop loss to 10 euros, and set...
I need thd exact same macd as in android mt4. Where can I download it, whats it called in the codebase? I need the exact same paint on pc as in android.
Hello, I need help. I need to add push notifications alerts to a MACD indicators that comes by default in the mt4 for windows, this MACD finds divergences and draws a line where the div is in the price and also in the macd, it's very nice for me.    This is the original MACD code, can someone modify...
Hello everyone, i need a help Sometimes i close orders whole and sometimes i close orders partial. Can anyone to give the condition for the below code because it open a bulk orders against the close order. void OpenClosedOrders()  {    for( int i=OrdersHistoryTotal()-1;i>=0;i--){...
Hi all, if I use Note Pad I have no problem in typing @, [, ] and other buttons, but when I use the MT4 Editor the same keys returns different symbols. Where is the problem? Thank you!
I am a little bit new in this language, but I have the basics. I want to trade EUR/USD, and my account is in EUR. I have 1000 EUR in my account. What I want: open a position with stop loss and take profit. I want to place an order with 100 euro, and I want to set the stop loss to 10 euros, and set...
Hey guys, I know it sounds silly but this piece of code I use in almost every indicator is a riddle for me. It works perfect but I don't understand what I am doing there. The purpose of this code is that something should only be executed once a minute even if timeframes are changed.  I know it's all...
Hi It's part of my code: Print(" Open:", OrderOpenPrice(), " Bid:",Bid);if(Bid-OrderOpenPrice()>=(30*Point)){        // Send Order} Output in journal of strategy tester: Why Bid price jump from 0.87801 to 0.87822?  In this situation my expert goes wrong(30Pip distance in condition). because...
Hi All, hope you can help me. I have found that if my terminal is shut down by way of power crash or accidental click on the terminal x button, the EA that I was running at the time continues to run when I reopen the terminal, probably due to the incorrect removal proceedure. This nearly always...
Hi all, every morning I start the terminal I get many wrong signals because it takes a couple of seconds until all of my 20 chart windows are refreshed. So my indicators work during the refresh-process what they shouldn't do. I know that indicators can't wait but is there a possibility to check if...
  Need help with coding (133   1 2 3 4 5 ... 13 14)
Hi i am trying to code a very simple EA but i'm not a programmer and i've never made an EA before. I took the MACD Sample from MT4 and edited some parts and deleted all the rest that i thought i don't need. I'm sure my code is really horrible I would like the EA to work like this: My custom...
Hi guys,  I'm trying to make the OrderSend function work for my first EA, but for some reason it's not executed,  can anyone tell me what I need to change? Update: I can see that it works on forex, but I need it to work in stock indexes through spreadbetting.  For some reason it works in GBPUSD, but...
  Previous tick's value (28   1 2 3)
I, a custom indicator, just got a new tick and am currently in Start already. I need to find out whether I am to move up from the previous tick or down. Where do I fetch this information?