MQL4 and MetaTrader 4 - page 1276

[Deleted]
Hello, I am trying to write this line into my EA to set a stop loss, but i don't understand the calculation... {SL=Low[i]-(MarginPips+StopLoss)*Point; SL is the Stop loss to be used in the trade, MarginPips is an input parameter aswell as StopLoss, but i dont have a clue what Point is! Its not an...
I hope you can help me understanding why the backtester does not use the whole available historical data? My system works on the German 30 (DAX). In order to have a lot of historical data, I downloaded and converted the data from Yahoo Finance: http://finance.yahoo.com/q/hp?s=^GDAXI The System I am...
I tried adding this code to stop the alerts from sounding continuiously. They should only sound once for each candle. If a new candle starts, then it should be reset and allowed to sound again. Any ideas on what is wrong with the code? // Store the start time of the most recent bar which has been...
[Deleted]
in my EA some time error 129 (invalid price) is coming how to overcome it when i am taking 2 orders at a time for one order it is getting this error how to overcome from this problem can any one help me in this regard
I have some code to work out the average amount of pips that price exceeds a 2 period LWMA on my chart. Someone advised me it had to be worked out using the moving average but shouldn't it be using all the candles on the chart? So, if price exceeds the LWMA, I increase the count to work out the
Hi all, When I make 2 (ordersend) after eatch other, the second order return -1 I put a while around the second order, but stil, many -1 results, but as soon as I recompile the order get sendt, and no problem! while (ticket2 < 0){ ticket2=OrderSend(Symbol(),OP_SELL,0.05,Bid,5...
I'm trying to draw a linear regression channel in an EA I'm working on. The two points I want to use are: T1 - beginning of the calendar day i.e. 0:00 T2 - 8:00 am on the same day. However I want the T2 of the channel to constantly update with each new bar forming (that is on the M15 time-frame)...
i want to make a dll,it works independently from its caller . it is triggered by a Timer,there should be a procedure that do something and get an initial data. there should be a function and calculate the data and export the result . my thoughts as follow, but the code does not work,will someone...
New article The Optimal Method for Calculation of Total Position Volume by Specified Magic Number is published at mql5.com: The problem of calculation of total position volume of the specified symbol and magic number is considered in this article. The proposed method requests only the minimum...
[Deleted]
Hi all, what is the API to use in order to call an external application (e.g. app.exe) inside an EA? Thanks.
[Deleted]
Hi, Could anyone please help me to understand the use of buffers. I need to create two upper bands and two lower bands around a simple MA. I used ienvelopes, but the deviation is in percent. I need to use a point value. Here is a sample; double BotBand1 = NormalizeDouble(iEnvelopes(NULL,0...
[Deleted]
Hi All Need help if possible to get the price value of Fibonacci level 4, as an example in my case. i tried using double vSell = NormalizeDouble(ObjectGetValueByShift("SELL",OBJPROP_FIRSTLEVEL+4),Digits);Ticket=OrderSend(Symbol(),OP_SELLSTOP,ILots,vSell,Slippage,(vSLS),TP,EAName,Magic...
[Deleted]
  Email alert  (1)
Hello great forex experts,i am a newbie iin forex market,i got this indicator that i want to add email alert to it,the indicator is good and profitable but you can not sit with the laptop for 24/7 to wash it working so it will be more useful if email and sand alert is added to it. I want the alerts...
I know,understand and appreciate that you are focused on and hard at work on MT5/MQL5. But MT4/MQL4 willlikely will still be around and in use for quite some time to come yet and obviously is at this point in time. I have theMT4 'Multi-Account' client and though it is a little cumbersome to trade...
[Deleted]
Hi Would like help regarding the above. I was writing an EA when I encountered error with ordermodification due to invalid stops . I noted i was using MarketInfo("EURUSD",MODE_POINT) for the code. As this is my first time using it, i tested with an EA: int start() {double point =
[Deleted]
Can somebody please share with code how to find Friday open and close when today is Monday. This day has 23 hours only. Thanks a lot.
[Deleted]
Dear All Could anyone advise me regarding my questions regarding the above. I have just started learning MQL4 with 0 background in programming. I have gone through the book multiple times. I would like to draw 2 examples from the book. Example 1 Problem 22. Create a program that counts ticks...
Sorry if it's difficult to understand at first, I will try to explain. In my expert I don't open orders OP_BUY or OP_SELL. I open orders 2-5 (OP_BUYLIMIT, OP_SELLLIMIT, OP_BUYSTOP, OP_SELLSTOP). I was wondering if the spread of the moment the order is opened could be handled, just as I used to do...
Hi, I coded an EA that can open positions on multiple symbols. So if I backtest it on GBPUSD I'm expecting it to open positions on other symbols as well, like EURUSD, but this gives an error. Here's the code that returns an error when I backtest in a different symbol than EURUSD. The error is error...
[Deleted]
[Update on 07/24/2010 - Please see my newest reply] I only need this for use in an EA... I need to be able to get the value of the linear regression line for a period of 8, but I need to know the value for both the current bar, and a previous bar... Aka.. I'd like to do something like... if...
  disply price  (1)
how can i display the entry price on the chart
New article How to Write an Indicator on the Basis of Another Indicator is published at mql5.com: In MQL5 you can write an indicator both from a scratch and on the basis of another already existing indicator, in-built in the client terminal or a custom one. And here you also have two ways - to...
[Deleted]
Hi, I need transfer data from MT to excel through DDE server from multiple brokers. How do I it? Transfer data from one broker is ok, this is easy. Multiple? Thanks. :-)
[Deleted]
Hello, what is the best free builder advisor for Meta trader for someone with no idea about programming ? It would be important if it comes with some kind of explanations. Kind Regards.
[Deleted]
Hello .. I want to get maximum of high of 5 or more pips .. for(i=1;i<=X;i++) { if (iHigh(NULL,perioda,i) > max) max=iHigh(NULL,perioda,i); if (iLow(NULL,perioda,i) < min) min=iLow(NULL,perioda,i); } I think its good. Minimum is ok .. its for short positions .. But long position when Close[0]>max
The usual sales pitch and it wont be arount long blag. One thing did appear though and that was that if the EA did not work in MetaTrader 5 they promised to update it. So thought I would ask the question, will MT5 be guaranteed backward compatable or not? anyone know?
I am not familier with coading and would really appreciate it if someone could assist me to understand what it is I need to do to get this indicator to work. Thankyou, Pat.
[Deleted]
Hi, I hope someone can help me. I'm running the code taken from the MQL4 Book, which is called tradingexpert.mq4, in the section Simple Expert Advisor. I'm trying to perform a simulation of this code in Strategy Tester. The program has been successully compiled and loads into the tester but does not...
The script i generated with my EA will not "move" to my MT4 program and become active. Im a complete newb to this. Where can i find tutorial?
B"H Hello, Trying to run the strategy tester on a certain symbol, "TestGenerator: no history data ..." message is plotted to the journal window. { I'd like to emphasize that symbol's graph is open at the same period in which I'm trying to run the Strategy Tester } How (and where from) can I download...