MQL4 and MetaTrader 4 - page 855

To post a new topic, please log in or register
I copied EA's to MT5. They do not appear in navigator indicators. I tried expert too, and they're not there either. I copied to program files\ metatrader 5\mql5\ indicators. They do appear over in program files folder. I installed EA's before in mt4. So I know how to do this.Any help, Thank-You.
Within a Script, I would like to open a new chart, but can find no documentaion on how to do this. Ideally, I would prefer to skip the solutions that include sending keys to the main terminal window (i.e. ALT-F N). I have found examples of how to attach an EA to a chart : int MessageNumber =...
  Tandem trades (3)
I have heard of a service where a trader has a stable of customers and each trade the trader makes is made in tandem on each customer's MT4 platform. The size of the position is in the ratio of the trader's account and the customers' account balances. How does this work technically speaking? The...
Hello. I would like to know how to make an indicator that takes past bar values. I have this code in the special function star: Buf_0 [i] = IMA (NULL, 0,13,0, MODE_SMMA, PRICE_MEDIAN, i)-IMA (NULL, 0,24,0, MODE_SMMA, PRICE_MEDIAN, i); If in one of the indicators, I want to select values of 3...
Hello. I have a problem with all Custom indicators I use: when I asociete the indicator with some price-screen, the screen goes gray, and don't let me select anything with the mouse. sombody know why is this? thanks againg trader201
what is wrong with this code. it doesnot work.. if (OrdersTotal()==0)             FileDelete ("mydata.dat"); I am just trying to delete the file if there are no open positions. thanks in advance..
I've written some EA which I backtested on 10 years of 15min EUR/USD data If it shows consistent profit through all that period will it be normal to assume it will work for the next 10 years ?
How do I run a script within an indicator? Thanks ...
  Error 4109 (2)
Error 4109 Meaning = "Trade is not allowed in expert properties" Can anyone please tell me what his means and how to fix it.
How can I export the trade tab in excel ? Thank you, saluti dall' Italia, Scheggia97
  Need CMO (2)
I am not find the Chande momentum oscillator. how I will get it ?
  &_____ ...??? (2)
What does it mean to place an "&" in front of a variable .. example: somefunc(int ...., string &var1) {..} can I use "&" with ints, doubles? &Thanks!
Hi, Is there a way to find out that a pending order has "entered into market". I'm developing an EA and I'm checking if the pending orders are in the market using the price, but sometimes the spread variation and some fast price action, I miss the correct entry point. Any ideas? Best Regards
Hi All, i have problem in deleting pending orders, my ea opens 2 pending orders one BuyStop and the other SellStop. When one is opened the other should be deleted. Please tell me what is wrong with my code: double   FindSell;bool CloseBuy;datetime t;for (FindSell = OrdersTotal()-1; FindSell >= 0;...
Hi, I am used to do some backtests with the data of metaquotes. For that, i create a new folders in the hystory folders where i copy the xxx.hst files i need (usually M1) and the following files : symbols.raw, symbols.sel symgroups.raw and ticks.raw I have notice that the spread used for backtest is...
Hi All, I'm a newbie MQL4 developer and want to write an EA which amongst other things, would be able to access the current data value of a proprietary Indicator. I stress it's JUST the Indicator's current value that I need at EA execution time (as can be seen in the Indicator's window on the...
I am hoping that someone might tell me how to reference or set up a horizontal line, that when added to the chart will only appear in the area to the right of last price bar or candle and adjacent the price axis. I am happy to add the lines manually. Seems this would be a good way of removing...
New article Orders, Positions, and Deals in MetaTrader 5 is published at mql5.com: Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from...
I'm tring to use orderclose/ordermodify. I think before use that, I need to use orderselect. I have this code: if (condition1) { OrderSend(OP_BUY...) } for(int i=OrdersTotal();i>0;) // this is for select order if there are orders opened { OrderSelect(OrdersTotal(), SELECT_BY_POS...
How can I make a certain price level like the Low[1] to be a constant? My aim is to set a level of the previous bar as a stoploss that will work if the close price of any of the next bars is lower it, but not the bid (current) price like usually.
If using my EA I sometimes get this message, but I can still manually access the Trade Server. However, as I want to run the program continuously, this is a problem. In the worst case, my program can initiate a trade but then if the connection breaks down, my EA can not close the trade when...
Is it possible to see if a question posed on this forum has been read?
A strange behaviour :     int    Cur_EffSum, Cur_StratEff;                  double Cur_BKPercent;         Cur_StratEff = 75;    Cur_EffSum   = 190;        Cur_BKPercent = Cur_StratEff / Cur_EffSum * 100;    Print("Cur_BKPercent: ", DoubleToStr(Cur_BKPercent,8)); output : Cur_BKPercent: 0 But this :...
I occasionally have a number of limit buy or sell orders in place (multiple lots so I can scale out) that bog down just before reaching execution level and I would like to execute all of them at one time at market. Is there an EA available that does this? Thanks, SR
int init()  {//---- my indicators example code. just draw two arrow //----    ObjectCreate ("Arrow0",OBJ_ARROW,0,Time[0],Close[0]);    ObjectSet ("Arrow0",OBJPROP_COLOR,White);    ObjectCreate ("Arrow1",OBJ_ARROW,0,Time[1],Close[0]);   return(0);} // in my EA start function // i just want to get...
Hi, I'm not too familiar with MT4 and have encountered a small problem and ask if someone might know where I got wrong. Attached is a very simple indicator which should write the pips difference of 2 Ma's in a separate indicator window in two alternated rows. It seems okay for past bars but after...
Hi all, Been a while since I have done this sort of coding, so I'm a little rusty... I need to get the computername and am trying: #import "kernel32.dll"string GetComputerNameA(string lpBuffer, int nSize);#importint start(){   string name;         GetComputerNameA(name,32767);      Print(name);...
Good evening, i'm having trouble to let my EA place pending orders when the middle white line on the chart is touched/reached. What am i doing wrong? i only left the necessary code in here, because it was too long to post here... double         BottomGoldLine;//Bottom, gold linedouble...
  Email alert (2)
Please help add email alert to indicator.
Hi, Anybody any experience in connecting IB to MetaTrader 4? I tried MT4 IB Connector from a link on this forum but doesnt work. I also tried to login using Demo account from IB and entered IP and Port but no go as well. Don't get errors as well, only No connection.. I've seen a couple of expensive...