MQL4 and MetaTrader 4 - page 1227

To post a new topic, please log in or register
Hi guys, I need to write the coding for the following task. I would be very thankful if you can rewrite it in some clear way. By the way, I have 2 questions related: 1) does it create problems using too many "if" in an EA? 2) if I put a "return" after any of the following "if", that "if" if executed...
hello, bool ObjectMove(      string name, int point, datetime time1, double price1) what does point mean? if i have a diagonal trend line object with time1,price1 and time2,price2. and now i want to move this line to "a new time3". which point value i should use? a simple example would be really...
Where could I get it ?
Hi Guys, I need someone to help me automate a trading system that I have developed. Is there someone out there that can help?? Contact me at marketdemon@comcast.net if you think you may have the answers for me. Thanks
Hi folks I'm new in Forex but I'm learning that sometimes I need to put resistence/support lines in my chart. What is the best way to do this? Is there a script that can do this for me? Thanks Alcy2k
  error 134 (3)
Hi, I'm new to metadrader so excuse my language. My problem is, when I test an EA, some trades are made but not all of them as I often get the error 134 "not enough money". I've read somewhere and think that my problem comes from that the lots are in EUR while my balance is in USD so the margin...
Dear Posters of MQL4 Code examples I finally learned the trick of getting formatted code into posts... woweeee------------ many many thanks Rosh! Now, if I can do this, being an old codger... please could others not currently using the information relayed in video link below do the same? Why? cause...
Hi, I understand how to use the command line interface to open an MT4 platform and apply an EA to a chart. But please explain how I can do the following using the command line interface, if possible: *) Apply EAs to different charts, for example, EA1 to H1 EURUSD, EA2 to H4 GBPUSD, etc. *) Close out...
I have a situation where I have found a good EA, but it does not set stop losses. So I built an EA that takes profits off the table and minimizes losses. The first EA enters the trades nicely so I want to keep using it. The second EA goes through the ticket orders and decides when to cut losses by...
  Error 129 (3)
Even though I have useddd refreshrates it is still getting the error and not processing the close for (int i = 0; i <= MyTotalOrders; i++) { if (OrderSelect(i, SELECT_BY_POS) == true) { if (OrderProfit() > TakeMoneyAt) { if(OrderSelect(OrderTicket()...
Hi, Every body my question is for Metaquotes can we suggest any new features in software. Like for example I wanted to give an additional tag to the orders. For which currently I am using an array to do it. But my technique has flaw tha if a expert advisor is restarted I loose the tag on the order....
Hi, gurus, I am trying to let EA stop openning new positions for a few mins after a position is 1. closed by EA itself due to indicator conditions,2. reaching target or stop loss or 3. manual closing. if ( (TimeCurrent()-OrderCloseTime()<120)) {Print("Wait"); return(0); } if ((total>0) &&...
Hi, does anyone know if there is a MQL4 plugin for Eclipse SDK? Probably not... But wouldn't this be awesome? Probably everyone who works with Eclipse will agree with me. I mean, sure...with a lot of tipps for the programmers, we can try to make MetaEditor really as good as comparable IDEs from...
I'm just starting to learn writing EA script. So, forgive me for such a newbie question. I'm using iADX. And part of my code: [script] CurrentADX = iADX(NULL, 15, PeriodADX, PRICE_CLOSE, MODE_MAIN, 0); PreviousADX = iADX(NULL, 15, PeriodADX, PRICE_CLOSE, MODE_MAIN, 1); // BUY...
//ERR_TRADE_TOO_MANY_ORDERScase 148:                /*On some trade servers, the total amount of open and pending orders can be limited.                If this limit has been exceeded, no new position will be opened (or no pending order will be placed)                and trade server will return...
Is there a way to show volume ( buy and sell seperate ) with a line graph instead of bar?
Iliya
Online Trading. Internet Trading first gained fame in the mid 90-ies as technology, you can simplify and accelerate the process of receiving applications from private investors to deal in securities, as well as a highly profitable business. Eventually, this led to a revision of a number of economic...
Hello,I am using Expert trading system, Cyberia Trader. I dint have any problem with loading this system to thesoftware or any ting like this. The problem I have is that as soon as the EA start working in Journal I havered dot and ‘trading by experts is prohibited’. I set up this system on full auto...
I have a question about using Expert Advisors at FX Pro. FX Pro has 5 digits after the comma, this causes the hat the MetaTraderdisplays f. i. 2 pips, like you have only 4 or less dgits. Instead itdisplays 20 pips. Ao my question is, does this influence the Expert Advisors in the wrong way? Is it...
Does anyone knows how run an EA on several accounts at the same time? on the same computer? is there something that can be done w/ the multiterminal? I was told it is posible, but not how... I´ll appreciate your comments Thanks C
Hi! Is it possible to run Strategy Tester by more than one symbol? Example: Chart: EURUSD Code: ticket1=OrderSend("EURUSD",OP_BUY,1,Ask,1,Ask-25*Point,Ask+25*Point);ticket2=OrderSend("USDJPY",OP_BUY,1,Ask,1,Ask-25*Point,Ask+25*Point); How can I order USDJPY on EURUSD-chart in Str. Tester? Thanks!
Hello, are there any scripts which would allow the following: 1. to automatically close all selected orders. 2. to automatically modify all selected orders with a given parameter (e.g. T/P or S/L). So far I've only found a script to close ALL open positions. I'm missing the functionality to close...
Hi! This is my simple code: int start()  {//----  int ticket;  ticket=OrderSend("EURUSD",OP_BUY,10,Ask,1,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);  return;//----   return(0);  } I'd like if this code would run just once, not by every newer tick. How can I do it? Thanks
Hello, Please can someone in the house help me with a good and reliable VPS Virtual Private Server Provider for my Trading Platform, Thank you
Is there anyway to write array data to CSV file dynamically without having to build out the whole FileWrite function? Seems the only way to write a CSV file is to separate all my variable by commas in the FileWrite function's arguments. It would be very helpful if the FileWriteArray would write to...
Hi! I have a little problem with MQL4! Normally i work with another software to develop trading systems or expert advisors. But now my employer told me to switch to MetaTrader und now i try to code my systems into MQL4. So now the problem: One part of a system is that a trade runs up after the price...
I need help please, I am trying to close orders from different currency pairs ( long and short ) but with the same magic number  when the profit reach define target " lets say 15 pips" without touching the other orders with different magic number so I wrote this code to check open trades and count...
Data in the file keeps getting overwritten. handle = FileOpen("xxxxxx_log.csv", FILE_CSV|FILE_WRITE, ";"); if (handle > 0) { FileSeek(handle, 0, SEEK_END); for(int a = 0; a < num_indicators; a++) { FileWrite(handle, log_time, a, "value",...
I have an EA that I want to expand with some trading rules. Right now it enters a trade whenever an indicator tells it to do so. However I want it not to trade when it is near a fibonacci resistance or support level. For instance, it could enter a trade long just when it is at a resistance or short...
SimonTrader
Hi. What is the time scale unit? If I am in 4H time frame e write 1000 what does it mean? And what if in 15m I write the same datetime? How long are them? Thanks. SA