MQL4 and MetaTrader 4 - page 235

To post a new topic, please log in or register
I use this code to open a pending order at 100 pips under current price, but it opens a market order at the current price please guide me double point = MarketInfo("EURUSD",MODE_POINT); OrderSend("EURUSD",0,.01,MarketInfo("EURUSD",MODE_ASK)-100*point,3,0,0,"",0,0,Green);
Hello, I want to get a Screen Shot that is called by EA when order is closed and make screen shot from MT4 Active workplace. Manually it is possible to make this by selecting 'File -> Save As Picture... -> Active Workplace -> OK', but is it also possible with EA?   Unfortunately I have only found...
I know this topic has been bashed around a lot on various forums,  but I have tried everything that I can find and nothing works,  including the ever popular   if(hwnd == 0) {     hwnd = WindowHandle(_Symbol, RTimeFrame);     if(hwnd == 0) {       return;     } else {       Print ("Offline Chart...
Hi friends, Is there any way to upgrade an indicator/EA which was created previously to a new version instead making changes in the initially-created indicator/EA file. for example having ABC.ex4 version1 , ABC.ex4 version2 , .... I know that we can create new files and copy-paste the main code...
I want to loop the program until new candle occurs     static datetime newbar;         newbar = Time[0];          while(newbar == Time[0])               {                Print("Still Old candle");               } Print("Now new candle occurs");   every program run this While Operation...
  Need help ! (2)
Hi all ! i'm sorry, i'm new here and i don't know were i can find answers to my questions, i hope here i could have some ideas and answers. I read about trading robots and i'll like to have your advice and ideas about them. is that a good or it's another scam?  on one site <Link Deleted> they wrote...
Not long ago, when running a step-by-step back testing, and indicators were placed in tester.tpl or testing.tpl  ,  it was a case that the indicators that ought to plot as MTF, would not do so. You just could not see where the plotting MTF was taking place, as bars progressed. .  i.e.  they would...
Hello everybody! I ran into some problem of compatibility of tick data and rates. This simple expert (in attachment) compares rates_bar.high(low) with the maximal(minimal) value of tick.bid for same period, and catches situations when rates_bar.high < tick.bid.max or rates_bar.low > tick.bid.min....
//+------------------------------------------------------------------+//|                                                    hedgetest.mq4 |//|                        Copyright 2016, MetaQuotes Software Corp. |//|                                             https://www.mql5.com...
Dear friends, Hope you're doing great, I want to know how to put a code in my EA in order to automatically  uncheck the  "save account information" option box in the account authorization window when attempting to log in to trading account. Suppose that I'm using my EA on a chart and  I blocked any...
  Profitable Ea (15   1 2)
Does anybody has for share a profitable EA? I tried to run at my strategy tester some EAs from the elite section at EA files ->https://www.mql5.com/en/forum/176044 but i don't know why, the Eas didn't run at my strategy tester.
Hi everbody. I work on a Relative Currency Indicator (RCI) I want to develope an chart showing multiple pair in indicator window. For example showing GBPJPY, EURPY, USDJPY together in EURUSD chart. Currenctly I developed some programs but they are not as good as for my purpose. I faced some issues....
I am new here thanks for having me. Please forgive me if this was brought up before. I'm a active trader and many times I have 10 or 12 pairs sitting on my MT4. So I look for set ups. It would help immensely if we could find a way to interact with the Mt4 and make it like a slide show of charts that...
Hello i just started using <deleted> for demo, and i noticed they have price alerts, I thought this would be super helpful since, I can open few charts in full screen and just get notified when the specific. currency touched the levels I wanted to get alerted on
Hello Please advise the code.    if ((OrderType()==OP_BUY) && OP_BUY==Close)    {          CloseAllBuy();          return(0);     }    I would like: If one buy is closed by StopLoss, then go to "CloseAllBuy()".   Thank you 
Hi all, I would like to ask if it possible to code this situation: I have alert indicator for Stochastic Oscillator Cross, The alert it is limit to alert me only If the indicator crossed in the H4 Timeframe. I note that if I'm viewing the chart in the (M5) Timeframe it alert me with every new bar in...
Hi everybody. I would like to develop an EA, but unfortunately I'm horrible managing "code", specially when I have to add conditions. The system is easy to understand. And should work for all pairs, and all time frames. And also only 1 opened trade allowed by pair, at the same time)   * options : (...
I don't want big slippage happen while opening or closing orders.  However, the slippage is still often much higher as over "10" although I set "slippage=3" already. Now that the slippage in "OrderSend()" and "OrderClose()" don't work at all, why MQ team added it as the function parameters? How can...
Hallo, I am a newbie so it may be a very stupid question. I have used the following script   //+------------------------------------------------------------------+//|                                                    alligator.mq4...
I was wondering if itis possible to create a kind of semi automatic EA or program. Something that willstart a series of moves in MT4 once triggered, whereby I want to pullthe trigger manually (or betterpress the button to make it sound less martial).
when we optimizing an expert most of us uses the control point to do so when he get a good he became happy thugh this choice did not reflect the real test to prof this if you repeat the test using every tick you will see a different results (most of them are to bad) now when i tried to use every...
Hi,  First , i m not a coder but i can read so much coding. I have an EA with fires a trade based on OnTick() "i think" but would like to get that confirmation based on closing /opening bar please , can someone help , thanks !!   void OnTick()   { //----    manage_trades();       if (count==0)...
Hi, I'm new in EA programming and I have this problem > I communicate with DLL from EA I need to push new prices to DLL and it will all be handled there OnTimer and OnTick are not working for me I made a loop in OnStart but DLL UI is lagging Can somebody help me? Is there any asynchronous timer in...
hi guys,   well i wonder with all these experts and bots online is it truly worth learning mql?   im good programmer, so learning new language is easy for me, thou i have very tight schedules due my other job. so wondering if really worth learning mql and will it do any actual help on trading?...
Hi all, I have two pending orders for test purpose. One is buy limit (OP_BUYLIMIT is 2), another is sell stop which is OP_SELLSTOP 5. There are only those two pending orders, no any other orders or trades. I put the following code in an almost empty EA, in the OnInit function,         for(int i = 0;...
Hello!!  This is my first topic. I am new in this forum and just started to program some expert advisors :) I am trying to get a code for getting the highest value of a moving averaage within a period of time,for example 10 bars, but I am not able to get it. I have tried: int P2t=iHighest(iMA(NULL,0...
I am sorry if it sounds strange, but the place is exactly for this forum (other platforms on another place).  This is the story: I've downloaded vTerminal, since I had problems (probably only me) working with real trades with, I made very similar one on my own. After trading of around 2.3K manual...
Hi all,  I pretend to close the last order maintaining the first order in place.   The ea is working fine to the moment that an opposite order is in place, but when I try to close the last order regarding it bounces back and passes the line of the indicator that do not happen.  Is that possible for...
i would like to do trailling stop only once a bar  can anyone help pls? 
Hello everyone, does anyone know, how I can calculate the swap in case MODE_SWAPTYPE is 2 (by interest)? I know how it works with 0, 1 and 3. Thank you!