Download MetaTrader 5

MQL4 and MetaTrader 4 - page 751

To post a new topic, please log in or register
how to check same ticket ? I use follow code,but can't check same ticket... void OpenPosition() {            int b=0;            int s=0;            int bb=0;            int ss=0;            int li_4 = OrdersTotal() - 1;           for (int l_pos_8 = li_4; l_pos_8 >= 0; l_pos_8--) {      if...
When I run my EA, there was no error, but cannot trade. Please check for me. thanks so much extern double Lots=0.1;extern double Stoploss=20;extern double Takeprofit=40;extern double Factor=4;//----   //----  //+------------------------------------------------------------------+//| Calculate open...
Hi everybody, I'm wanting to know if it is possible to make it so that when you click on the 'New Order' button the Volume is automatically set based upon a calculation? I would like to have it automatically set to a percentage of Free Margin relative to unit price. Volume = Free Margin / Price *...
I've imported three currency histories to MT4 that date from 2001.01.01 to present. Since then, my computer has slowed down and my demo account has been prone to problems the most recent of which being "history base not enough memory" messages. Is there a quick fix to this problem? For instance,...
Hello all, I am new to MT4, but I have experience programming in other languages. I have a question about how to execute expert advisors. I know that I can execute an expert advisor by attaching it to a chart while inside of MT4, but I was wondering if there was a way that I could see what was...
Hi, Could someone please help me. I am trying to use seconds elapsed since the start of the day using my computers time in an EA using TimeLocal() and cannot figure out how to do this. Any suggestions would be highly appreciated
I just re-wrote my old weekend function. I'm trying to make it more universal without using DLL for time issues. It's your typical Weekending and Weekend Gap function. I'm wondering if anyone have an easier way of doing this without dlls? Issues to consider. 1) Some brokers week starts on Wednesday...
Beware fellow Mql4 developers. ForexCio EX4 is a scam. After having paid for the software through wire transfer, I requested the activation codes, but nobody is answering me for two months now. I even called the number of the company representative to whom I made the money transfer. And nobody is...
Hi all could someone help me with the formula for Bollinger bands? This is what I have got: int BandsPeriod = 20;BollingerMA = iMA(NULL,0,BandsPeriod,BandsShift,MODE_SMA,PRICE_CLOSE,1);Deviation=MathSqrt(Close[1] - BollingerMA);Deviation = Deviation/20;UpperBand = BollingerMA + (Deviation *...
where to get EA for indicators with up/down arrows ?? entry when arrows appears exit when opposite arrows appears
Ok I know this is a complete newbie question! I trade with IBFX on the MT4 platform. I have noticed that a currency pair like EUR/USD has 6 decimals 0.00000 but when people talk about PIPs gained they only use 5 decimals 0.0000. And the same is for a currency pair like USD/JPY that has 5 decimals...
NEED A INDICATOR TO SOUND ALERT WHEN MACD ON A 15 MIN CHART SOUNDS WHEN PASSES ZERO AND WHEN IT HAPPENS TO CROSSOVER.
I have read that the new version of MT4 Mobile will be for Android but apparently it is not available yet. Already it appears that Windows mobile is rapidly becoming obsolete. Anyone who buys a new mobile lately is likely to not be able to use MetaTrader Mobile because it is not available for...
the following code is working in some brokers but will fail in others. In some brokers the function will return 0 instead of returning the value of the top order. double Open.Sell.End()   {    double OOP=0;//OOP=Order open price    if (OTMS(Magicsell)>0)//OTMS= Function is return Order total with...
hello, I am new to this forum, but I can see here a lot of experts. Maybe one of you have the right answers for my problem. I want to create a very simple strategy, but I need that the trades to be entered automatically or smth like that. The simplicity of the strategy is as follows : let's say I...
Looking for someone to make already exisitng indicator macd with histogram to sound alert when it goes above or below zero and also when there is a crossover. Please reply with usd prices.
how to use this indicators??? Help me in finding this 1
Can anyone write a simple EA that generates BUYS or SELLS when the Stochastics crosses a manually drawn trendline (see picture below). I haven’t been able to find anything like this on the web, so I hope it’s not an impossible ask. In this case, I want the EA to send a buy when the Stochs crosses...
  stop modify (1)
My EA send the signal to the live account to modify the stop of order.In the log file, it showed the modification is confirmed. But at the same second the stop-losses already been triggered. I think if stop-losses is executed, the modification of orders should be rejected. Is it a coincidence? If...
Hi all I am a newcomer to MQL although I have been coding for 10+ years. My question might have already been asked and for that I apologize but I can't appear to find it in a search. The problem is as follows: I want upon close of a candle (say 1HR) to enter a pending BUYLIMIT order. However, 50% of...
Hello! SMTP server: smpt.gmail.com SMTP login: myname@gmail.com SMTP password:************ From: myname@gmail.com To: othermail@something.com Gmail and MT4 works on laptop (Win7) but not on other computer (Win XP). Both computer have same internet connection. There is no wireles connection only UTP...
For some reason I can only get the Strategy testing for a purchased EA to work on only one of 3 computers. Even more puzzling to me is, the one that it works on is the oldest.They are all Windows XP operated. I can trade my live acct. on any of the 3. When I run the Strategy tester on 2 of them I...
I have clicked a 30 pip trailing stop that is actually 3 real pips and it worked but when my trade was 20 real pips in profit I clicked the 130 pips and it never came in even though the trade remained 20 pips or more in profit. If the 30 pips is 3 pips one would assume the 130 pips is 13 real pips...
After copying an ex4 file to the experts folder, is there any way of "refreshing" or similar to get the file to appear under Navigator / Expert Advisors without having to restart the terminal?
Hey guys, I'm Rob. You might know me from other sites like Hot Stock Market, Forex Factory, and Informed Trades. I've been lurking here for a little bit and decided to go ahead and introduce myself. I've recently become interested in learning to create my own indicators in MT4. I've been trading for...
Hi guys, I need your coding help. I want to open a hedge byopen 4 postions at same time: MagicNumber_1: buy EURUSD and sell USDCHF ß(Hedgepair1) and at the same time MagicNumber_2: sell EURUSD and buy USDCHF ß(Hedgepair2) Now I want to close each Hedgepair when the profit ofa Hedgepair...
Hello! Does anyone have tutorial/settings/properties how to get hMailServer to work with MT4? Is there any other/better solution? I had gawab and it worked great but it not anymore. :( Thanks!
Hello, I want to ask how to initialize global variables after an Order was executed by the System via Stopp Loss like Tester: stop loss #1 at What kind of check is necessary like using OrderMagicNumber or using OrderTotal Method? Thanks for a code snippet. Hoschie
Hi, I have been trying to run the below script to open an order for e.g. EURUSD. When the active window in Terminal is EURUSD then the order is open but if I click on a window of any other symbol, the error 129 appears. I need to open two orders for pair trading and don't know why I can't do that....
I used Stockastic for normal trading days.. but missed opportunity of today bull run on the US/CAD, any ideas ?? combination of two indicators ??