Download MetaTrader 5

MQL4 and MetaTrader 4 - page 95

To post a new topic, please log in or register
Hi, Yesterday I encountered weird string corruption, which I narrowed down to the following code: Fh=begin_head + Fh; Fh was more than 1000 ascii chars long, begin_head was maybe 50 chars. After this code, the resulting string was ok, but on the end contained appended part of the original string....
I have been able to get almost every wm command to work except this one:  PostMessageA(hndl, WM_COMMAND, 34100, 0); // for the first profile   is there a different function I should be using? is PostMessageA correct?  
[LOOK] How can I set my indicator to change the time-frame when I switch to other time-frame? I want to know the best way to do it.  Here's my code: iMA("EURUSD", Period(), 14, 0, MODE_SMA, PRICE_CLOSE, 0); // Here I used Period() function to get the current TF  What happen to previous data in other...
Hey Guys, I searched a long time for some examples to close one specified Trade after a specified amount of time. Or in another way, to close this trade at 23:59. Before the new day is beginning.  Can anybody help me please to code that or is there another way? Greetings and Thank you! 
  newbie help (10)
I need help with adding some code if(Close[1] < ma)   How would I add that the ask is higher by (x) number of points above ma. 
Hey Guys, I want to make a backtest but for that I need to programm my EA so that it is possible to execute more than only one trade? At the moment I have programmed it so that the EA can only trade once. But I have no idea how to programm the EA so that he can trade more than one time but only one...
I'm experimenting with using what I think of as 'triggers'. They are booleans that start at false and then are set to true when certain parameters happen (X line cross Y line etc).  I can then get the EA to place an order when a number of the booleans are all true. The advantage is that it allows...
I am getting the error as described in the title MQL5 community: failed to start thread. You can see this on the attached screenshot.  Restarting MT4 and/or the PC fixes this for a while but the problem always comes back eventually What does the error mean and how best to fix this?
Hey, I´ve been searching quite some time now but didnt find anything, so I hope anyone can help me here   I want to close an order after 24 Hours, but it should be at the end of the current bar(Dailyperiod), not at the start of the new one, in case of gaps.  And I dont want to close all open trades,...
I got this error when trying to upload a chart from MT4 Screenshot: can not save temp file I tried googling that error but nothing helpful came up - what does it mean? Rich
Hello fellow programmers,   I need a EA created for Binary Options based on CCI and RSI in a ranging market. See attached example which explains what I am after. Hopefully not very complicated for someone out there. If you need anymore information please let me know.   Thanks in advance Sham 
  how to refresh symbol data (24   1 2 3)
Hi, I have a script to scan candlestick pattern on multiple symbols. When I run the script in the morning, it always gives me candlestick pattern the day before. After I run it again, it gives me today's pattern. Seems that the first run did not download the symbols price data. How do I force...
Hi   I'm new to programming in mql4 so apologize in advance if I offend anyone with my questions.  My issue is I am trying to use a custom indicator (Pinbar - https://www.mql5.com/en/code/1768) in a EA using the "iCustom" function. For some reason the values shown in Data Window for the buffers used...
Hello,  can I find a script somewhere that counts all open orders? I found a lot of discussion about such features, but no solutions or none that did anything when installed. A simple count of all open orders would do, but additional functions would be lovely as well (total lot size open, buy vs...
Hi Guys, I was wondering if anyone could help me with my EA. I want my code to enter a long position if each of the previous 5 bids are all higher than the previous bid. In otherwords: Enter long buy if: PrevBid5<PrevBid4 PrevBid4<PrevBid3 PrevBid3<PrevBid2 PrevBid2<PrevBid1...
Hi guys, I am looking for a way/function in MQL4 to return the name of each EA running on each chart, if any. For indicators, coder can navigate among charts and identify the indicators running on each chart. I wasn't able to find a similar function for experts. Is there any one? To better...
Hey,   sometimes when backtesting the Ask-line disappears at some point for a certain amount of time while the Bid-price is still moving up and down. How could that be possible? What does it mean? Every seller needs a buyer. It can be possible that the the Bid prices rise and Ask prices don't but...
Hi, I wrote an intraday ea for M1 timeframe based on Open so the start function begins like this:   int start()                                   {      static int lastBars;   bool status = false;   if( lastBars != Bars )     {         status = true;         lastBars = Bars;     }    if (status...
hi guys, i have an issue with the Automatic Validation Process, in the Draft stage. It ends with an error (OrderSend error 131-Invalid trade volume). The validation fails there.Can anyone suggest me which part of my ea code should be checked and how to be corrected in order to eliminate that error?...
Has anyone had any experience with finding the highest high and lowest low, between two points in time.  I'm trying to draw a line at the highest high and lowest low from 3:00 p.m. to 5:00 p.m. est.  ( 19:00 - 0:00 )  I can draw a line between these two points of time, but only at the high and low...
Hi,   I am a retail forex trader for several years and would like to develop my own personalised EA that is based on technical indicators for trade signal and execution.   Kindly help me on how to start as I have never created an EA before but understand trading quite well.   Thanks and regards 
Hello   In installed MT4 on my laptop but got a strange language and do not know how to fix it : please seee attached file   Thanks in advance 
Hi Guys, Could anyone assist me with why I get an array out of range error with this code and how to fix it?  I am very new to MT4 coding.  Thanks in advance!  extern int MagicNumber=10001; extern double Lots =0.1; extern double StopLoss=100; extern double TakeProfit=30; extern int TrailingStop=0;...
Hi at all, in MQL4 It's possibile use command "Print" or "printf" with color in Expert form of MT4 ??? How?  Or What's command ?   Or for print with color i must use only chart window with ObjectCreate?  Thanks for your help! 
I find way how get count open chart window in platform MT4 and how get their handle. I need control if open new chart window . I use for open window this code and sometimes it happens that the command PostMessageA(hTerminal, WM_COMMAND, 33160, 0); don´t open new chart window. I need catch this...
Below is a short piece of code as I try IF statement for the first time MQL4 - It takes the difference between he high and low of the range to determine the stop loss value in points.  Currently, this is only running for specified pairs (but I will amend it to run on any pair at some point and work...
Hello, I'm newbie with mql4 but I have some experience programming in other languages...  This is not my first EA or code... but I don't understand where I fail, so please I need help.  In the array  ticketoperacioneslong  I memorize the ticket of the orders i placed. I want to be advised , informed...
Hello !   I'm very angry at MT4 as I bought a few indi, I had 5 activation at first.   I use 1 as normal, than I HAD to use another when windows update to 10 (I heard some people got their activation back). Today I need to update an indi I bought on the market and I'm still ask for an activation. !...
Hey guys. I am desperate of getting more history on some trading instrument charts. Looking for Palladium, Platinum and Copper history. Can anyone advice on if and how this can be done? Tools/History Center doesn't help. Thanks in advance!
Hello everyone I stated this symbol:       SetIndexBuffer(6, InIndicator);    SetIndexArrow(6, 83);    SetIndexLabel(6, "InIndicator");  how do I draw it on the chart just insert the indicator?