MQL4 and MetaTrader 4 - page 33

To post a new topic, please log in or register
Hello everybody. I have a very simple piece of code that calculates candle size (current and previous). Then, based on the simple panel sample, I created a panel with 2 labels. I searched, but I was not able to find how to get the variables on the panel. I'm sure there is a way......
Can anyone help me by providing an example of how the following function is used correctly.. #import "user32.dll"   long CreateWindowEx(uint dwExStyle,uint lpClassName,uint lpWindowName,uint dwStyle,int x,int y,int nWidth,int nHeight,int hWndParent,int hMenu,int hInstance,uint lpParam);#import...
  MT4-Java API (70   1 2 3 4 5 6 7)
I'd like to introduce MT4 Java API: http://www.easy-share.com/1908253435/jfx-1.2.2.tar.gz MT4 Terminal Java API (JFX) is intended to provide Java interface to MetaQuotes trading servers through the standard MetaTrader 4 client terminal (MT4 Terminal).
Can you include a way to pause/slowdown the backtester after it has reached a certain time or date/time? MT4 tester does not currently have ability to pick HH:mm time of day to start backtest.  So you always have to start at the beginning of the day, even if what you need to obverse is near the end...
I have installed metatrader 4 via PlayOnMac.  When I try and follow signals, I just get a prompt to download meta trader 4. Unsure on how to get signals setup on MT4. Any help would be wildly appreciated. 
Hi, I'm trying to open a buy and a sell order then delete them if they don't open in 40 seconds. The loop is decrementing, but only the sell stop order deletes. I can't figure out what I'm doing wrong. Here's my code: double sell_ticket;   double buy_ticket;      int TotalNumberOrders =...
Dear MQL4 community, thanks for all the support from everyone out there. I need some help on how to add in some comments into my OrderSend() orders which expired without any trades. I know how to add in comments for those EA orders which successfully trade, but for some of my orders which passed...
Ended up getting tangled and confused again by an example given in the manual/tutorial regarding Function Calls. Here's the code: //------------------------------------------------------------------------------------int start()                               // Description of function...
Is it true thatfunctions like iRSI returns 0 (zero) if you haven’t yet open that symbol in thegraph window or downloaded its historical data? In the nextsimplified code theRsi returns 0 for some symbol/timeframe combinations. Is there away to avoid this? string theSymbol = "";int theTimeframe =...
Dear guys I create a button. it work on very well. but it is not work on backtest. I don't know why. can anyone tell me how button work on backtest on visual mode.  Thanks 
Hi, there is an indicator in sub-window. I want to make arrow signal in main windows not sub-window. In the followings: #property indicator_separate_window#property indicator_buffers 7#property indicator_color1 Red#property indicator_color2 Blue If I make arrow signal buffers, It shows up in a...
Why does the Warning "empty controlled statement found" come up when using  if(enableCount == true)  within the following code? void OnTick()    {      double close = Close[1];     datetime time = iTime(NULL,0,1);   static int barCount = 1;   static bool enableCount = false;...
Hi, How can I detect a double click event on a Chart ? I can do it for a single click using : void OnChartEvent(const int id,                   const long &lparam,                   const double &dparam,                   const string &sparam) { //new logic    if(id==CHARTEVENT_CLICK)    { .........
I would like to count the profit of a varying number of closed trades.  At the start of a martingale string of trades, each trade is provided with a tradenumber in the OrderComment ().  The trade number is increased by 1 after each loss until a win where the number is reset. After a certain...
Hi The 2 lines below are braking my code: #include <windows.h>#include <stdio.h> Error: can't open "C:\Users\myname\AppData\Roaming\MetaQuotes\Terminal\someid\MQL4\Experts\windows.h" I tried to locate the files manually on my system for no avail Any suggestions? Thanks
Hi The code below is expected to take the screen shot of the chart window as is, but when I shift the chart window x number of bars, it still takes the image as if the chart is not shifted, It also shifts my custom indicator so that it does not align with the chart bars correctly, which is not...
I am busy developing an EA. EA works but I have 2 warnings in code when compiling. does anyone have a solution towards removing the warnings? 1st one  possible loss of data due to type conversion 1st Hedge EA overlay v7 timer.mq4 229 81 2nd one  possible use of uninitialized variable 'ticket' 1st...
  last order profit (17   1 2)
Hi all,   Say that I have more than one order open and I just want to get the profit, commission or any other information regarding the state of the last  order. Is the following code the right way to get it ? void OrderGetProfit()          {        Profit = 0;               for(int...
ok so im new to programing in mt4 so i don't know a lot of the functions yet but i think i understand most of it but i don't see where it adds the rsi value after the short name that gets displayed in the top left corner  i also added a rigged up alarm there probably is a better way to do the...
ok so the first ObjectCreate puts it in window 0 (main) and the second ObjectCreate  puts it in the 2 i dont know why???       ObjectCreate("m5",OBJ_LABEL,0,0,0);      ObjectSetText("m5","M5 "+iRSI(NULL,5,14,PRICE_CLOSE,0));      ObjectSet("m5",OBJPROP_CORNER,0);      ObjectSet("m5"...
Dear programmers, How to get market End time and Start time by mql4? I seen post about MODE_STARTING and MODE_EXPIRATION. But i can not able to get that information into chart. Please help me. Thank you.
Hi there, I tried this program, and has the following problem with it. When the price comes close to the action time, I get several buy or sell actions all ending in losses, they are not that big, but they all add up... Once the price have moved away from the cross, it is more stable and remains in...
Hi all, I was just wondering if anyone could let me know if i am on the right track. I am trying to make an EA which measures the highest point and lowest point for the first 4 (1 hour) bars of each new day. I know how to check for new day : bool IsNewDay(){static datetime OldDay = 0;if(OldDay <...
Not going to argue about this. It's a bug. It's been confirmed by others. I'm done with this. MT4 is problematic, and I don't see it changing any time soon. So i'm deleting the original message.
Hello , I found in google USD Index formula : usdx = usdeur ^ 0.576 x usdjpy ^ 0.136 x usdgby ^ 0.119 x usdcad ^ 0.091 x usdsek ^ 0.042 x usdchf ^ 0.036 x 50.14348112 But the same for EUR Index ,GBP Index ,CAD Index ,JPY Index ,CHF Index ,AUD Index , NZD Index cantbe find  I just want their...
Hello I'm beginner. I had many questions on this site. Always thank you. I have some ploblem about Interlocking Expert and Indicator. I'm using function of iMA in Expert. But chart and tester don't display graph. but If I push the stop button in tester, that display graph. I want to see the graph as...
Trying to figure out how to find the high between two points in time.  From January 1st to March 1st.  Going in circles.  Perhaps someone could look at the following code and tell me if I'm headed in the right direction. Thanks!...
Hi,  in just found this strategy: https://www.mql5.com/en/blogs/post/712016 Does anyone know as if there is allready a ea for mt4 for this, which gives automated signals`? Thanks!! LISA
Hi Admin, I have no choice but to post here. I have an account with MQL5 but when I login, the remember me does not work. When I tried to post something, it ask me to login which I already did. When I visit my profile page, it is blank and does not allow me to do anything. Please help.
hello, is it possible to add a new column to Optimization Results? : I would like to add "Loss Trades". I can use TesterStatistics(STAT_LOSS_TRADES) in Ontester() or Deinit() functions but I do not know how to add the value to Optimization results. thanks in advance.