MQL4 and MetaTrader 4 - page 371

To post a new topic, please log in or register
Yesterday, MT4 popped up saying Build 625 update is done that I didn't aware that all mq4 files were overwritten. Then I backup image (whole hard drive) last night. Until this morning I open one of the mq4 files through MetaEditor - I am surprised that all my recent code is gone. The last code was...
Hallo,  Im looking for a function in MQL4 that allows trading volume to  be set at 0.01 lotz if balance drops 10%   Can anybody help me please?   Kind Regards 
APeng
ObjectCreate() is not working in backtest optimization, right? (I am using build 401 ;) )
Hello, On many of the EA's I have there is a function that will prevent buying or selling at a certain distance from the top or bottom of the market. It is user set in the variables i.e Points_Bars, Points_Restrict, Points_Period etc. Is it possible to code it so the user has the option of entering...
I was wondering if there was a way to watch past candlesticks form. Is there an indicator or way i can do this?   I would like to watch them form instead of just popping up to the current live candle. This would help me a great deal. Especially if I was able to watch them form with indicators that I...
Hi all, I am new here, hope to get support from you. I just downloaded MT 4 platform (482kb) file, then I run this.exe file getting a message that mt4setup.exe has encountered a problem andneeds to close And if click on more details> error signature appname:mt4setup.exe appver:5.0.0966 modname...
hi all friends  i found an automatic ea for putting SL & TP , could any body help me adding a trailing stop to this expert? . i ll appreciate any help or advice
Good afternoon, I hope you are fine. I was wandering of someone could please explain the difference between these two values... MODE_MARGININIT     => Initial margin requirements for 1 lotMODE_MARGINREQUIRED => Free margin required to open 1 lot for buying I can see their values are different. If...
Hello ,I want to find a way to close several opening positions at the same time, as soon as possible .I have some code below...   for(int i=0;i<total;i++)        {         if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES))            continue;         if(OrderSymbol()==Symbol()            //&&...
I used the following EA to display the value of Chikou_span at 10:03:03 on August 12th 2014... double Chinkou_value =iIchimoku(NULL,0,9,26,52, MODE_CHINKOUSPAN, 1);int OnInit()  {//---   //---   return(INIT_SUCCEEDED);  }void OnDeinit(const int reason)  {//---     }int start(){     if (DayOfYear()...
  Meta editor (6)
My meta editor isn't working correctly, compiling doesn't work sometimes. Do i need to get a 'fresh' meta editor file, or is there some repair possible?   Ed 
  Error -1 (4)
What is Error -1 When i try to send an order in gold sometimes i get -1 error and sometimes it is executed. Any help??    This is the code i am using to send a buy void OpenBY(){   int li_0;   if(!IsTradeContextBusy())   {      li_0 = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slipage, 0,...
Hello,   I need to write code for this. Every day I open two positions. One for BUY one for SELL. I set up T/P and S/L for both of them. I repeat this every day. I need to detect when is event of T/P from day 1, that pending order no.2 will be deleted. For example: 1st day: order BUY1, order SELL1...
I have difficulties to save a correct Report from history using Windows 8.1. It is not possible to read it correctly,it doesn't work with OS Windows 8.1. Can anybody give an advice how to fix it ? Thanks.
  PERIOD_H8 (2)
I have written an EA in MQL4 which returns some information about the previous bar with the following lines: double H1 = iHigh(NULL, PERIOD_H4, 1);double L1 = iLow(NULL, PERIOD_H4, 1);double R1 = H1 - L1;double HC = (H1 - C1) / R1; This works fine there is no problem. However if I change this code...
Hi I wonder if I can use MT4 for getting EMA, MACD, stochastics crossover on stocks. Thanks!
Hello, I'm trying to make an indicator that takes 4 entry values (Stochastic Oscillator, Stochastic Oscillator Slow, RSI(9) and RSI(14)), powers them to some set weights (w11 to w14) and then multiplies the result to store it in a variable (S1). Then, this variable is multiplied by another set...
Hi:   I met a problem when I use the OrderModify to change the stop value, an error pops as: OrderModify error 1 For example, the message occurs when I try to place the stop 3 pips under the low price of previous close candle.  It seems not affecting the result, but just keep showing the error...
Hi everyone !   I've tested my EA based on Ichimoku technic, it suppose to display an arrow up when Ichimoku indicates a Buy signal and an arrow down when it indicates a sell signal, but i see no arrow on the graph, just the Ichimoku curves (and i didn't asked my EA to show those...) Here is my code...
Hello Im trying to install already downloaded templates and indicators on meta trader 4 however, when going on to the platform and loading templates these files do not show up. I am placing file in the templates folder. Anyone experience this type of problem.
DDE and excel - Volume I am not getting volume to work, the mt4 sample does not have volume I have tried these but not getting volume to work i have bid,ask,hi,low working but not volume ='MT4'|VOL!EURUSD ='MT4'|VOLUME!EURUSD =MT4|VOL!EURUSD =MT4|VOLUME!EURUSD
if(CheckValueTime==iTime(NULL,TimeFrame,0)) return(0);else CheckValueTime = iTime(NULL,TimeFrame,0); I got this code from other forum and I have this code in my ea too. And I got a different results between with and with out this code. With this code it's can run optimization faster than without. I...
My MT4 folder has more than 60GB capacity. I found there many logs in subfolders C:\Program Files\MT4\logs and C:\Program Files\MT4\testes\logs Many files was grater than 3,4,5,6 GB ! How to disable logs on Meta Trader 4 ?
All builds are 670, Jul 2014. DLL calls are allowed under tools, options. I don't know if this could even be an error with the code?   #import "user32.dll"   int GetParent(int hWnd);   int SendMessageA(int hWnd, int Msg, int wParam, int lParam);#import#define WM_MDIACTIVATE 0x222#define MAX_CHARTS...
Hello I have a 28 charts loaded with the same EA, and AutoTrading off.  The EA, on init, opens a file, populates an array from the contents, and close the filehandle. If I click AutoTrade on, all the EAs jump into action at the same time.  They all try and access the file at the same time.  I know...
The article Why Is It Important to Update MetaTrader 4 to the Latest Build by August 1? has been published:From August 1, 2014, MetaTrader 4 desktop terminals older than build 600 will no longer be supported. However, many traders still work with outdated versions and are unaware of the updated...
One of my MT4 platforms is an Alpari 509 build that I've always kept offline for back testing since the history data I've imported to its History Center has always remained imported with no problems.  For some reason, the latest EA I've tried to back test on the platform won't produce any results....
Hi all,    Does any one know how the calculate the formula for a stop out level, basically how many points if i have a n open position i need to loose to reach certain stop out level?   Thank you in advance  
Hi, first I tried this - which works fine: ...extern ENUM_MA_METHOD      Ma1_Method = 0;... Now I wanted to add (for the tester easy to vary) another not standard moving average, so I wrote: enum ma {   SMA =0, // Simple moving average,    EMA =1, // Exponential moving average,    SMMA=2, //...
Hi, first of all thank's for a good update! But seems there is a lot of work to do more)) Windows XP 64 and MT4 Build 670 in Program Files (x86) I'm launching fresh installed MT4 via \Program Files (x86)\MT4\start.cmd: cd /d "%~dp0"terminal boot_r.bin /portableexit boot_r.bin is:...