MQL4 and MetaTrader 4 - page 717

To post a new topic, please log in or register
I need to subtract, 1 day and 1 hour, from this server time below: 2012.02.10 00:06:53 so that I could obtain the server time below: 2012.02.09 23:06:53How can I do this? any help please appreciated greatly.
If an MT4 broker has a real STP / ECN - is there any way a trader can use an EA to take advantage of price feed, either by logging into 2 VPS or by any other means, which would cause the broker to actually lose money from his winning trades? I remember we had a client running a manipulative EA on...
When I start the build script, it does not write the CSV files to the folder (SEE 3rd Screenshot).The files are empty. I'm sure this is a simple fix for some around here. This is an issue in this article that did not get resolved 2 years ago, please can somebody show me what to do? Thank you!! https...
My EA reads the server time and the currency from a File and then it tries to use the data in my iBraShift() function to get the opening price of a Bar which Shift point at. Here is the code below: string pair=StringSubstr(TYPE,3+u,6);string SEVTIME=StringSubstr(TYPE,144+zp,20); int...
In the process of building an EA, I got a little confused with this question. As I understood it (and please correct me if I'm wrong), 'Volume' is basically the amount of price changes (i.e. incoming ticks) for every bar. One thing I've noticed is that often times, one tick would come in, but volume...
Hello all, Newbie here (bear with me) - I thought there should be some marketinfo constant to return the direction of last price change, I looked into this but could not sort it out: so what would you suggest as code for returning the sign of the last price change (both ask and bid)? I am trying to...
Time ago, I used zigzag values, to reset another indicator value every high/low; Unfortunately the work was lost; every zigzag, the zigzag indicator returned than an zigzag occurred, so the sum on second indicator gone resetted; I don't remember the procedure, the trick or which zigzag indicator I...
Is it possible to find the price of ask and bid say at server time: 2012.02.09 11:17:16 from history? If yes, I would appreciate your help.
Hello, I just registred here to see if anyone could help out with some errors I get when I try to backtest, it is really enoying and stalls things a lot, the error messages I have been getting is Test generator unmatched data error volume limit exeeded . how can I do to be able to backtest again?
I am to profitable…… And have 7 platforms running with this settings. My broker changes the settings of the Expert on all of the platforms ubnight. Each platform have at least 3 of this ' to good' expert running, so it takes a while to restore it to my settings…. Is it possible to Lock settings...
Hi, I had left an open trade last night on WTI crude oil and was filled out for a loss, without placing a stop loss order. I placed a take profit order at 99.45 and the price spiked to 99.49 at 11pm. 02:18:04 '91091933': order #78099179 buy 10.00 US_OIL at 99.17 was modified -> sl: 0.00 tp: 99.45 02...
Is it possible, that an EA can save the Statistics.htm? I code already a PHP to analyse the statistics.htm and make nice graphics. But It's always annoying first manually to safe the Statistic in MT4.
My EA reads and executes 2 file names: 1-Trade is opened, 2=close. After the EA is enabled, I have instructed the EA to look for existence of File "close" and if it also finds the File "Trade is opened" delete both files together, provided there is no open trade, avoiding possible execution and...
Hello, seems i can't think right today. I need to figure out a function which returns the current streak. (5 losses in a row or 3 wins in a row for example) Since the ordering of the OrderHistors() is not reliable (as said in the doc) the function i have is kind of expensive as it requires a loop...
1. Why is it necessary for an EA to deinitialize and reinitialize if I change the timescale of a chart? I see no reason for this, and it doesn't help me. 2. If it is necessary, can I supress the messages that are shown in the Experts tab regarding initialization and deinitialization? They make it...
Hello, I am having a little trouble reading ChandelierExit.mq4 values. ChandelierExit is a custom indicator that calculates and draws stoploss based on the volatilty of the market. It's code it's the following. I want to read the short and long stops to update the SL of my positions. I know that...
Good afternoon, I have a simple problem and maybe you can help me to sort it out. I want to use full stochastics into my Ea, which displays values from 0 to 100. Like this: However, the EA receives floating numbers that are not in the 0 - 100 range. How can I make iStochastic() to behave as in...
  please help (2)
I've installed MteTrader 4 & 5 but do not know how to use them. e.g. set limit loss/profit. I'm in demo environment but can't set to trade i.e. placed a new order but keeps getting a sound and no trades executed. Can someone please help me or point me to somewhere where I can get help. Thanks in...
Hi, I've written an indicator to test out the trigger for my EA . But something is wrong with it as it seems that my indicator buffer are only stuck at 1 level. Hope some kind souls could help to point out the problem in this Indicator....
Hi. I have an EA. It has gone well on IRON and PRO brokers.(No ECN/STP type) However it doesn't work on any other broker such as PEPERSTONE, ADMIRAL (ECN STP type). I don't know why it doesn't work. Please let me know and solve my problem. Thank you. I attach my EA.
Hi, I have declared a lot of variables like int Varname1 = 5; int Varname2 = 10; int Varname3 = ... Now I tried to convert my code with a for-loop automatically. I tried this, but it doesn't work: for(z=1; z<5;z++){ var = pips2dbl * StrToDouble(StringConcatenate("Varname",DoubleToStr(z,0))); ...} If...
I am trying to write a script that compares the rsi of the eur/usd to the aud/jpy. Here is what I have so far: iRSI(NULL,PERIOD_M15,14,PRICE_CLOSE,0); I am not sure what goes in for NULL. I couldnt find if it is possible to do a comparison like this in the reference. Any ideas would be great. Thanks
Hey all, Not new to trading but DONT know programming. Looking for script/ea that will close open position or remaining open lots if or when any following bar CLOSES below the low of the opening bar and vice verse of short trades. (any following bar closes above high of opening bar.) Is this...
Hi, I'd like to draw a rectangle around a label object. How do I do this? A label object is defined by XY-distance, while therectangle is defined by price/time. In other words: How do I map XY-distance to price/time? Thanx. ForexFan
Hi. I would like to know if the following could be done without affecting the copyrigth of Metaquotes, that is, legally: One hypothetic client of mine would send to me his "symbols.raw" binary file from his MT4 client terminal. I would modify this file (to allow him to back-testing (via Strategy...
Hello, I am a beginner MT4 coder who needs some help. Luckily, it is not going to take too long to explain my problem. I am trying to create a Fractal EA Scalper that takes 5 pips from every fractal that displays itself on the screen. But I cannot get the trading logic to work as I would like. Here...
New article Speed Up Calculations with the MQL5 Cloud Network is published at mql5.com: How many cores do you have on your home computer? How many computers can you use to optimize a trading strategy? We show here how to use the MQL5 Cloud Network to accelerate calculations by receiving the...
fftremblay
Hi everyone, Maybe you can figure what's wrong with the following program. The logic of the code is to create a range of 10 pips where the low is always going to be the lowest price since the EA started and that the price did not touch the upper band of the range. Every time, the upper band is...
Hi together, I'd like to know if it's possible to close an order automatically after a period and/or SL is reached... For example: I've opened a trade at 1p.m. and want to let this order closed when the quote reached it's StoppLoss or a period of 2 hours elapsed. Here's the actual code: // Buy...
How can i test my correlations expert advisor?, the strategy tester can't handle it