Download MetaTrader 5

MQL4 and MetaTrader 4 - page 181

To post a new topic, please log in or register
Hi, i have been trying to figure out why my trailing would not work. When a trade is executed, i would like to change the stoploss accordingly like a trailing stop. I used an OrderModify to modify the stoploss as per seen below but always ended up in an error. After some testing, i suspect that my...
I have searched google and the MQL's but I cant find any examples on how to change the colors of the axis, scale, etc. I would like to cahnge the according what order is open. red for sell,green for buy,blue for no orders.
Hi, I would like to ask if someone has already tried to accurately check if a certain trade is closed by stoploss or takeprofit. I have a function that deals with this but its not that accurate because it checks the orderhistory then checks the comment if it has "tp" or "sl" on it but the problem...
Hello Forum, So I recently started to think about recovery safeguards for this EA, in the event of server crash, power outage, the likes. One hint I found somewhere was to use... Global Variables of the Terminal as more permanent storage for some of items that would need recovery - mainly doubles,...
Hi All, I have an EA that opens trade at a specified time. It is working well on currencies. However I have a problem with CFDs. Curious is that if I use Strategy Tester, EA works perfectly. But when I set EA on my demo account to forward test it, it is not opening trades. No errors and no warnings...
I have written an EA that is quite sensitive to small price changes of 2 pips and more. When testing on historical data in the Strategy Tester it gives beautiful results, but when doing forward testing it is very disappointing and not profitable. When I retest the EA on the live data used for...
CUSIV01.MT4  compiling error called out. "Improper enumerator error cannot be used"   Can this be fixed? I am quite new to MT4.  But I like the platform very much. This particular indicator was working on my charts for a day. It a good one. Would like to continue using it.   Thank you for your...
So i have been thinking many days on this Problem and don't know how to fix it, maybe someone have Idee for algorithm, i will be very thankful Basically it's a Grid system, at Start it will open 2 level above with predefine Increment and 2 level under . Let say A for above and U for under , we have...
So, I have been using the formula below to calculate swap rate: Swap = Lots*Open Price*Symbol swap rate (long or short)*1/(360*100)*contract size*quote currency to usd rate Below are my calculations for several symbols: Time  Type  Symbol  Lots     Price      Price  long rate...
Care should be taken to verify each ownership, status, and location of each Forex trading firm, website, or app before signing-up for a trading account. There are many websites claiming low brokerage charges and high leverage (allowing more trading exposure with less capital), some as high as 1000:1...
Take a look at the example provided at https://docs.mql4.com/common/webrequest i have added Alert(result[0]); to see what server respond back, Alert(result[1]);Alert(result[2]);.... The array result allways contains numbers now i want to know how to recive contents at the website I send webrequest...
Curious if anyone is interested in helping me write a script
  new member (1)
Hi friends I am the new member of the forum!!     
Hi. In the new post of my blog I let you a metatrader library that allows you to read data from a Web Page. Its use it is fully commented through an example with images. I hope you like it and I wait for your comments Best regards, Mestize www.forexmq4.blogspot.com
Hi, how can i enable dll imports in a chart template? If i drag from the Navigator the EA works properly, if i load from a template it fails. thanks for the fast answer, Istvan
  C program (1)
Hello, i am new to MQL4 and i wanted to know how can I run a program.c from my mql source code as external. I want the program to run continuously and at the same time mql extract some notes to a txt file so I can see them in the other day. Any help?? 
Hello, I am looking for EA that will close positions after close candle under/above MA. I found EA that closing positions when price crossing MA but it is not what I need  
Hi there, Is there someone here who knows how return an array on a function on MQL? Like if your are going to retrieve a data on CSV, instead of using different functions to get data one by one all of the data on the CSV, i mean one row of data will be put on an array then when you use the function,...
Hi, I'm trying to create objects by looping through an array...... here's the code, but when I try to compile, I get the error "  '[' - invalid index error  " Can somebody confirm if it can be done, and what I'm doing wrong Thanks in advance. //---Create Array of Symbols we wish to interogatestring...
Dear,why dose below program always display  ” ordermodify error 130 ” ?    void OnTick()   { //--- if(Hour() == 1 && OrdersTotal() == 0) { int ticket=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,NULL,1,0,NULL);        for(int i=0;i<=OrdersTotal();i++)            {             if(OrderSelect(i...
Hi,   After build 940, global variables seem to repeat themselves and persist even AFTER deletion and restart of the mt4 platform.  I seem to have global variables dating back to December of 2015.... anyone else has this problem or know how to resolve this?    
So, this code will draw the trendlines using the coordinates correctly.  It doesn't matter what I set the RayLeft and RayRight values to, Left is always on (true) and Right is always off (false).  And what I want is the reverse.  Anyone got any ideas?...
  Hello everyone, Here's the problem, I can't see the "visual mode" feature when I want to back test manually. Anyone can help me about this?  I'd be glad if you can help me out.    
I gather from the wealth of C# APIs out there that it is possible to connect to MT4 over TCP and perform various functions. The C# APIs I've found online are massively overkill for what I need - but presumably the people who made these API had some sort of reference document of how to communicate...
Is it somehow possible to carry dll as byte array in body of compiled .ex4 and deploy it at run-time and call functions? Does anybody have experience with it please?   thanks 
Is function Webrequest only for sending information? Can I use it to receiving information from a server too?
Hi there,   To prevent some boilerplate code, I want to read the file name, of the file a class is executing in..   There is no default MQ4 function available, but it should be possible with a native windows function (GetModuleFileName kernel32.dll) Source - https://msdn.microsoft...
I have a laptop with larger resolution 3200x1800 running on Win10 and I run MT4 Build 950. Most EA which show panel are not scaling very well. All text is confined in a small scale and elements overlap each other. How can I resolve this? Examples of bad scaling:
Pretty much as the title states, how can I find the first swing high and swing low of a bigger range?     
Hey All, I'm new here, long time lurker as a lot of google searches tend to end up in here anyway, so I thought might as well create an account and start participating. I'm trying to get an EA off the ground, and being able to code during the next few days would help out a lot. Currently using only...