MQL4 and MetaTrader 4 - page 1011

[Deleted]
i'm a newbie at mql4 coding, please help me to fix my script or make a new one. i have a script, that will set a pending order by the time setting. I have 2 pending orders each time 1 BUY, 1 SELL. If 1 of these trades is triggered and hits its take profit, I want to cancel the other order or close...
Hello guys lets say i have a file containing 3 lines with these numbers on it example file: 123456789 987654321 234568798 for example i need to call line 2 with it's number and set each number to a variable like: a=9 b=8 c=7 ... i=1 how can i open and use the file like this? thanks for helping me
  Backtesting with tick data  (38   1 2 3 4)
Backtesting with tick data I think I have found a good way of doing this in metatrader - and I have got a fair way through this method but have got STUCK and seek some help with the final stage. 1) Got tick data from a company (commercial source) symbol: CL (oil) free sources eg. dukascopy etc. dont
[Deleted]
I have an excel FX model that I trade. The spreadsheet generates buy/sell signals and I execute trades manually in MT4. I am trying to figure out how to pipe these signals from Excel into an execution platform (like MT4) and automatically fire off trades. Any help on how I might do this is greatly...
Hello MQL4 world, I am located in Los Angeles, California and I am looking for a developer to create two indicators to fit my needs. Both are very simple and I am willing to pay. The indicators: 1. Paints horizontal lines following candlestick closes, after certain requirements have been met. I...
Hello Does anyone know if there is a tool or a way to combine multiple entries into a single bar. So instead of having 2-3-4 bars on my screen showing each entry level, it would cost average them and show a single bar. Maybe this doesnt even need to be on a bar if it were done in the terminal...
[Deleted]
I would like to write an integer array of the lenght of the order of 500 000 to a file in MT4. My only ambition with the file is to be able to read the array in from the file sometimes in the future. Would somebody know what type of file to use and how to program it - both writing and reading-in?...
Hi, I use the MT4 app for iPhone and it is a pretty good tool to have when not at my main computer. Here is a list of a couple of things I would like to see added, if possible: 1. Addition of the Week & Month timeframes (maybe something could be added to select the timeframes we wish to see, i.e....
Is it programaticallty safe to manually keep track of ticket numbers an EA has opened in an array instead of scanning and using OrderSelect() the whole time? Are there any advantages to doing this - I think it may be faster if you have a very large order history. Do the ticket numbers ever change?...
[Deleted]
Hi, I am new to Forex and for the last two weeks I am trading in demo a/c with two different broker. I see different opening and closing position rate for a pair of currency & volume for a particular day or week in two different met4 terminal. What can be the reason for different rates in two...
  Strategy tester error 130  (16   1 2)
I've been looking at this particular problem for some time and am starting to feel I am missing something very obvious. Running on the Strategy tester I get error 130 consistently for some trades that happen during my testing period . . the vast majority of trades are fine. For example: 18:43:00...
Dear All forex friends, I am very new to programming / language etc.. BUT I had a VERY GREAT INDICATOR WHICH I WANT TO MAKE IT INTO EA . REQUEST ANY PROGRAMER OR FOREX FRIEND TO HELP ME INTHIS.. THE INDICATOR IS ATTACHED HERE.. WHEN IT GIVE ARROW IT SHOULD BUY IN EA AND WHEN DOWN ARROW IT SHOULD...
[Deleted]
Hi Friends, I am trying to use "#property indicator_color" command, however it won'tlet me add more than 8 colors lines. I am able to type and compile #property indicator_color9"onwards but it doesn't show up on chart. Also when I type this in Metaeditor, it stays black and doesn't change the...
  FileIsLineEnding  (4)
If I have failed to close an order then I write to an error log a ticket # and magic number in a string. The file will always exist but will normally be empty. I am trying to read the error file in a loop which starts with the following code. I would anticipate this this to be true and ignore the...
Hi, Please code a simple EA with Trailing stop from this free indicator signals. Thanks,
[Deleted]
dear sir or madam i am a hong kong investor . As i know, between 3.00 a.m. to 8 :00a.m. there is no gold price LLG. MQL4 price quote is from where ? Regards
This function will find the High or Low of some number of bars. I was pulling my hair out debugging this thing. The High part of the function worked great but the Low part of function always return 0. Then I realized that The variable barApex was not initially defined and so was set to 0. It was...
Hi, Is there any way I could keep the change of an extern parameter, WITHOUT changing its source code? Say, if original value is 10, then if some day I change it to 20 (NOT in source code), 20 will be remembered. And importantly: still give me chance to change it again.---- I just wrote a code
[Deleted]
Hi! I saw this indicator(ZIGZAG on fractals, without redrawing the values - https://www.mql5.com/en/code/10022) and I would like to get the last 2 values for an EA. The solution that I found only return one value for both cases (2147483647) using iCustom. int n, i;double zag, zig;i=0;while(n<2)...
as we know mt4 terminal has many severs to select automaticly when we open a demo account, but i only want the specified one,may i have it by simple delete the .srv file under the config directory . thanks
Help if any one can, I have MT4 on Alpari, Oanda and Nord Fx they all disconnenct and reconnect when ever they feel like it, I can not trade like this I have checked broadband everything ok, eventhough receiving 1mb re-installed all platforms again and not even running any EA's. I am running on
  i got two orders  (3)
my code is like this : start() { ......... if(orderstotal()==0) ordersend(.......) .............................................. return(0) ; } i got two orders . i want to know how long will the sever return the new accout statates after it changes .
Is there any way to cause a script to run when a particular function key is pressed like F9? thanks in advance MilfordT
Hi was wondering, could a GUI associated with a dll raise an event that will cause a MetaTrader script to call a dll routine to get data or input that the GUI has collected from a user? thanks, MilfordT
I am wishing to register for a postgraduate course at one of the the Universities in Sri Lanka. For the research i need open, close, high and low values of exchange rates of 7 major currency pairs namely, EUR/USD, GBP/USD, USD/JPY, USD/CHF, USD/CAD, AUD/USD, NZD/USD at 5 minute intervals from 2007...
Hello, I just had a first look at MQL4 and want to make sure I understood everything correctly. Is it correct that the only way to run MQL4 programs is to attach them to charts? I.e. is there no way to write a program that trades several currency pairs and is independent of any charts or uses...
pleas help me to do that if available or give me indicator for that
I try to put a trailing stop after OrderSend(), but it not work, please give suggestion. Thanks. Code: ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,Stoplose,TakeProfit,"My EA",MagicNumber,0,Red);      if(ticket>0)         {         if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))...
Hello, I use Casino111 EA, designed by Mitch99 on a demo account. You cand find it here https://www.mql5.com/en/code/9473 . I think this EA is useful and i am going to use it on a real account. My problem is that this EA does not make any trades after i trade one or more times manually. It sounds...