Download MetaTrader 5

MQL4 and MetaTrader 4 - page 650

To post a new topic, please log in or register
I use strategy tester from metatrader 4 Speed 32 is too fast and 31 very slow !!!!!!!! Any help please?
function for management void hedge{for(int i = 0; i<OrdersTotal(); i++){OrderSelect(i, SELECT_BY_POS, MODE_TRADES);if( OrderSymbol()==Symbol()&& OrderMagicNumber()== M1 ){ // simboloif((OrderType()==OP_SELL) ){// [ variables taken from order SELL ]stop = OrderOpenPrice();price =...
Every day, tens of thousands of unique users visit our forum, and we don't always manage to respond to violations of the Rules of MQL5.community. That's why we decided to improve our forum by introducing the status of a social moderator. We hope you'll like the candidates whom we've selected for...
The system will sell when the current price reach the upper bolinger bands,but it seems don't work .Help me,thank a million!!!!!!!
Hi guys, Another newbee question if I may. I want to write a custom indicator that will track for each bar in the chart whether price crosses a round number. I can do the round number bit because I just go to the textbook and use the MathMod formula, but I don't know how to store this for each bar...
When I backtest a EA in my laptop and desktop, it comes out different results. It say "unmatch data error" in my desktop. It places much less orders when I run it in desktop. I already check the Variable Inputs and parameters, they are same in both computers. And they both got history database for...
the picture below describe the strategy, waiting for your response please
When looking at the dollar index chart on my brokers platform and online at forexpros, the dollar index value is basically the same. However when I use the dollar index formula to calculate the dollar index by creating a cusom indicator and showing the index in a separate window, the value is...
Hi, how is it possible to include the "windows.h" bib?
Hi, I am looking for a way to store data to a mysql database. I have looked at the store ticks EA but that however does not do what I want to do. I am looking at support & resistance levels and I need to recaluclate these every 1 hour. So I am looking for a way of writing the 1 hour OHLC data to a...
Hy guys! I was looking for this EA for a very long time, I just don't seem to find it. Can you please tell me if there is one and I missed The EA should do the following: In case of multiple trades, to indicate at what value of the currency pair I trade (maybe more of them, not just one, all the...
Hi, Does anybody have a simple solution for solving "re quote" problems? Thank You!
What is the best way to work out the correlation between 2 different instrument in MQL4? Should I load the data into an array and then draw a chart from that? In Excel, it is easy to do this with some functions but I'm not sure if MQL4 has them I want to work out a ratio as below and then apply all...
Hi all, I have this code below that is meant to fire an alert whenever a new S/R level is created. The problem I am having is that the alert fires over and over again, and I would like for it to only fire once. I figure the easiest way to solve this issue would be to take the value of the S/R level...
I am a beginner programmer and I am confused How do I convert this FastD(NS1) <= SlowD(NS2) to MQL4? { Entry and exit conditions } EntCondL = true; EntCondS = FastD(NS1) <= SlowD(NS2); EndofSess = false; If DataCompression >= 1 and DataCompression <= 4 then EndofSess = time = SessionEndTime(0,...
Hi, With market orders on ECNs there no point in specifying slippage on OrderSend (its ignored). OrderModify has no Slippage parameter (as it would be pointless). So the only place to use Slippage is on OrderClose... Or is Slippage ignored here too ? How and where do Slippage fit in with ECNs ?
Hello, I would very much appreciate if someone could share some simple lines of code they use with Alpari to request a Buy Limit order. I have been able to do this with other demo brokers, but the code is always a little different, and I have not been able to come up with a variation that would work...
I have a very simple problem, or I hope it is. I cannot believe that this code is not working: ticket=OrderSend(Symbol(),OP_BUY,1,Ask,3,0,0,"",0,0,Green); I guarantee that the condition triggering this trade request works perfectly, but I am simply unable to create a market buy order. Do...
I want to overlay a mvg avg exp on the volumes indicator in mt4 please let me know if know the procedure,and would like add a signal line in the macd please help in this regard Thanks in advance.
This function https://docs.mql4.com/indicators/iStdDevOnArray iStdDevOnArray has a whole load of functions to do with moving averages? Isn;t a standard deviation just a simple calculation of the data in the array like in Excel?
The expert advisor that i use have a mind of it's own(but he was programmed so it would be logical what's happening, only i can't find the 'trigger') When i fill out for my profits 1 it's a profit of 10 . A stoploss of 100 must be filled out as ' 10'. So far so good and it is working well in my live...
Hello, I have tried for some weeks now to learn mql-coding. I would like to create a custom indicator where i want the difference between the opening and the close, the difference between the high and the low and the quote of above values. So far so good, but when I try to calculate an average of...
Francois Tremblay
Hi everyone, I am trying to code a DLL to learn how to protect my codes but I was wondering the following : How do you code the following statement in the DLL double Highest = High[iHighest(Symbol(), 60, MODE_HIGH, 24, 1)]; I tried different approaches but all failed - I am using the expert sample...
I WANT TO KNOW THE PRICE OF A PARTICULAR STOCK ON LOOKING AT THE RSI..I MEAN IF I SEE RSI COULD DECLINE TILL 40(FROM 60) I WANT TO KNOW WHAT COULD BE THE PRICE WEN THIS DROP WOULD OCCUR IN RSI..(AN ESTIMATE WOULD ALSO DO).I GUESS ON USING AN INVERSE FORMULA OF RSI WE COULD DO THIS, I AIN'T ABLE TO...
Hello MQL4, I was wondering if anyone has a custom indicator for Double Bollinger Bands. I can't seem to find it anywhere on the web, and I am not familiar with coding. Thanks alot, Dan
hi frnds, am new to mt4. nw i need a EA code for RSI my condition is, RSI>40 means SELL and RSI<20 means BUy can u anybody help for me. am waiting for ur replay frnds.thank u
I am assisting another trading coach to teach some junior traders about FX trading, systems analysis, backtesting etc. I am looking for sample EAs which "don't work" to use as examples for them. I have written some material for the students, but it would be more interesting for them to see other...
I want to compare the price of the EURUSD, for example, with the previous second or minute price. How can I do this? I try to use a while loop like this, for compare infinite times, but this code is very slowly and as time goes on is even slower :   double AskAnt = Ask;  double AskAct =...
Hello, I coded already an EA and I like to add, a function where it will save the Statistic.htm file with the current status to harddisk. Is that somehow possible? It is very tiring, always going to the "Account History" and right click "Save as Report" Or maybe it is also possible, automatically...
Hi, I'm writing a script for calculating the MAE/MFE (maximum adverse excursion, maximum favorable excursion) with the strategy tester. So far, my script works great for currency pairs that are either quoted in USD (ie - GBPUSD, EURUSD, etc) or when the USD is the base (ie - USDJPY). By the way, my...