Download MetaTrader 5

MQL4 and MetaTrader 4 - page 40

To post a new topic, please log in or register
In the absence of the CopyTicks() function in MQL4 I can try to construct an array of the last n ticks in a market by using the ArrayCopySeries() function in conjunction with the OnTick event and harvesting the [0] element of the resultant. Is there a better way? Thanks, James
I wanted the EA to coordinate file accesses using GetTickCount(). So I was testing what it can do and got this: It should sleep for 7 mSec but it never sleeps. Here is my EA, where am I mistaken??  Or is this just the reason why the terminals are so fast - the timer are influenced by the theories of...
I have problem in initilized all the variable while starting the new session of my EA. e.g. my martingale may go to level 3, it is loss, then I close it. After that I start another new session, it will continue to level 4, But I want is for it to initialize to level 1 again, not level 4. That is why...
Hi, everyone. I am new to MQL and just wrote my first EA as shown below(just a tester).Since I want to record all my open trades information( Open Trades ONLY), I tried using FileWrite Function to record it and export it to CSV.The problem I am having is that, when I run it through Strategy test, it...
Hello I have this script which works great, and changes *all* my charts to a selected template.  But I have various fx pairs and oil and gold, and I don't want the template change to affect the oil and gold as I have different templates for them, so I have to keep changing them after running the...
#property copyright "Copyright 2016, MetaQuotes Software Corp."#property version   "1.00"#property strict#property show_inputsenum Operation{   buy=OP_BUY,    //BUY   sell=OP_SELL,   //SELL};extern double Lots=1;           //Specify position size, this is ignored if you use the Risk %extern double...
Hi everybody, I coded an EA for MT4 which advises me by an alert when some conditions occur. The scheme of EA is int start (){//variables definition//condition//if condition is verified give me an alertreturn;} It only and simultaneously works on EURGBP, AUDCHF, AUDUSD, USDCHF, NZDUSD. For the...
  Advanced Cycle Analysis (129   1 2 3 4 5 ... 12 13)
Hi guys, there is meanwhile a growing community for advanced cycle analysis of financial time series that I decided to open a new thread to bundle these discussions a bit. Next to the wellknown thread Fast Fourier Transform - Cycle Extraction we have meanwhile also a lot of Goertzel Browser...
Hi,  Anybody can help to put this indicators to show data on MT4 data window with 8 digits after point, now they only show 4. And merge Snake, SMA Centered and TMA Centered in one Line, like the three indicators become one. King Regards,
Hi,  in my expert I have two pending orders (a buy stop and a sell stop) and I want to delete one when the other one get activated.  I used the order type so when the buy type changed from 4 (buystop) to 0 (buy) then the sell order to be deleted by order delete function. HOWEVER I found even after...
Belanda
Hello. I use this Support & Resisitance Line indicator. There is no issue when applied initially or after switching to another timeframe and come back to original timeframe. However, the lines are not updated even after corresponding higher timeframe candles which factors fractals are closed. Can...
Hi Guys I'm manage to write a automated trading script when I using iCustom to load my custom indicator it's seem like get value once and that value didn't change if I put it in "Init" function Then I try to put it in OnTick but I saw that script load indicator many times, I'm concerning about...
Hello, In the onCalculate method I often want to see for example the value of a moving average 10 bars back. To do that I have a loop that I run for every tick! for(int n=0; n<10; n++)        {         double fMA = iMA(Symbol(), timeframe, ma_period, ma_shift, ma_method, applied_price, i+n); // i is...
HI can anyone help with this. I have an ea that gets a price value from a horizontal line or trendline. However i have the code as follows but it will not pick up either value. If i remove the Objectgetvaluebyshift it will pick up the Horizontal line price and vice versa. But i need it to recognise...
Hi Chaps I would appreciate any help that you can give with the iHighest & ILowest functions, I have coded this and am getting whole numbers returned such as 138 and 9 respectively what exactly does this shift relate to with respect to the basic Pip or Point. Kindest Regards Will
I have written this small function which helps any programs to do the normalize of prices (without having to re-type the long normalize command), but it keeps giving this error. How can i solve this? //+------------------------------------------------------------------+double normMe(string ins,...
Hello to everyone. I'm trying to retrieve the SHIFT value from inside the indicator source code. Is there any manner to do that? I explain my need: when the indicator is called by the EA using iCustom, we have MODE & SHIFT parameters. From inside the source code of the Indicator, I need to know...
New MetaTrader 4 Platform build 1045 The MetaTrader 4 platform update will be released on 3 February, 2017, which is connected with the release of Windows 10 Insider Preview build 15007. Due to security updates in the new Windows 10 system version, MetaTrader 4 client terminals could occasionally...
  Correlations revisited ... (122   1 2 3 4 5 ... 12 13)
Quite some time ago I was doing some work on Pearson correlation indicator. It was working OK and I thought that the "story", as far as coding is concerned, is finished. There is Pearson, there is Spearman's rank correlations... Ops, lets go back a bit : Reading about correlations it struck me that...
Hi, Ever since the update to build 1045 I get frequent crashes in MT4.  I've submitted a ticket to the service desk. I'm running windows server 2008 R2 64 bit and accessing via remote desktop. The first thing that happens is a popup window that states "A required resource was" and the GUI goes...
Hi, my friends, Anybody can help to take a look if those indicators are repaint or recalculating.
Hello, I can not set the sales position. My expert enters long if high is greater than the n opening and sells low value if the opening is less than the value n. my code.  if ((High [0] -Open [0]> 20 * Point)) return ("buy"); // buy signalif ((Low [0] -Open [0]> 10 * Point)) return ("sell"); // sell...
I tried using the search on the forums but I couldn't find anything.   So I am looking for: Simple Moving Average indicator that will signal me when a candle has crossed the MA set at 12.  An Indicator that will automatically mark the open and close of the market.An Indicator that will automatically...
I wasn't aware that different brokers can use different symbols to indicate the same underlying (non-forex) instrument.  e.g. WTI is the same as USOIL.  Is there any way to remap say a trade opening using USOIL to actually open one for WTI in this example?  The other solution for me is to use the...
Hi everyone, I am using Windows 7 ultimate with Service pack 1 updated. Now I have installed FXCM mt4. I am trying to get the data folder by File-> open data folder. It takes this path " C:\Program Files\MetaTrader ". I am also trying to open my profiles In app data But no profiles shown. What can I...
  thai language (3)
hi friend my name pichai from thailand. I want use menu thai in MT4 file terminal thai.lng .
I need that my ea check stochastic value only every 5 minutes . So i wrote like this : .... double StochValue(ENUM_TIMEFRAMES timeframe,int buffer)  {   double val;   if(buffer==0 && CurrentTime!=Time[0])     {      CurrentTime=Time[0];      val=iStochastic(Symbol(),timeframe,InpKPeriod,InpDPeriod...
Hello I would like to know how to add the moving average(s) into a separate window (not by code but manually) the screenshot below is for that MA I am asking for: .. set file attached for the above screenshot
Hi guys,i've a indicator which calculates and if my condition is true,i want to call a method to a EA to execute an order. I was thinking about load a buffer,but i dont think if it gonna works. It's possible to call a method inside my EA from my indicator ? i'm already using ICustom to load a...
Hi! I'm looking for a person who can write few lines of code to add SL and TP to existing EA. Best regards, Michał
1...333435363738394041424344454647...1250