MQL4 and MetaTrader 4 - page 1067

To post a new topic, please log in or register
Hello, how would i output in my script how many seconds has past since 1970? I expect the number to be in a format ########## (probably quite a long number...) Thx! I tried looking up the date time format, but im kind aconfused (and new a coding) could someone possibly write exactly what i...
Gidday I am looking for a mm system that is based on using the daily range as the TP and SL. They way I am looking for it to work is the greater the range the more of the FreeMargin is risked and vice versa. I have attempted to code it my self but have had a bit of trouble My maths might be wrong...
Hi, I'd like to altern buys and sells op for my ea, but it keep on buys or sell.. I check the history tab with a loop with this code : int AlternBuySell(int MagicNumber) { int altern=0; int histb; int histbs=OrdersHistoryTotal(); for(histb=0;histb<histbs;histb++) { OrderSelect(histb,SELECT_BY_POS...
Hello All, I want to calculate the cost in account currency for 1 lot, so that I can now how much money I will lost/profit for 1 pip move. With this info then I can calculate in advance how much I will lost if stopped with stoploss, or how much I will profit if takeprofit is reached. Any hint?...
Hi. I have data for various pairs, but I can only get as far back as 1999. Can anyone assist in how to get data from 1989, because I need a longer term to better test an EA I am working on. Thank you. Lance.
Hi, I have a EA that I downloaded from a forum which backtests pretty well, it is a scalper with a small TP and much larger SL, when a buy position is opened and the market goes down it will open a sell position, the max opened positions is two, one buy and one sell, now I was trying to figure out...
Well, easy said. ive been developing EA for over two months now.. I had many EA, all based on different indicators, different variations etc.. But then I decided to create my own very simple EA working on very simply algorithm.. Not gonna describe the results, check the pictures and tell me what you...
With AUDJPY/M1 I stated that in charts for the period are missing 19 September 2008 until 26 January 2009 the bars. How can one close this gap? Or from where can one load the missing data?
I am just a beginner at building EA's, and scripts. I am still learning and still got a ways to go. Anyways in the mean time I want make in alert script to make my manual longterm trading much easier. I am in research mode to make an alert script that will notify me when a price hits a strong...
  Error #130? (20   1 2)
Hello, I have an error message #130 and I don't understand what is it... I trade on the EUR/USD forex. if (OrderType()==OP_BUY && OrderSymbol()==Symbol()&& OrdersTotal()==1) { OrderClose(OrderTicket(),OrderLots(),Bid,0,Green); } ticket=OrderSend(Symbol(),OP_SELL,lots,Bid,3,1.40,1.30,"Ordre Court",0...
Hi Everybody I have made a custom indicator that displays in a separate window that shows as a straight line. The reason is that I am using one buffer to feed back integer values about the state of the indicator and this buffer, although set to DRAW_NONE, interferes with the maximum level of...
Hello... Please advice me regarding the buffer calculation in the indicator. I modified iExposure.mq4 to show profit factor. but no data shown on the indicatorif added below code....
Hi, The subject listing pretty well sums it up. I’m new to ForEx and am using this commercial EA (FapTurbo v47 b225) on the MT4 platform while I am learning. With the default settings I was losing money. I’ve managed to tweak it so that it is slowly but surely gaining a little now but obviously...
When closing orders, do I have to reset or clear the value for " OrderTicket() "? I've noticed that when closing one order and opening another, the ticket number for the order being closed is the same number as the order being opened. And often the order to be opened doesn't.
Hi You all seem to get MT4 working on Linux but I can't. HasAnybody done it under SUSE 11.0. I installed a PCB layout prog and thatworks fine but MT4 gives a grey error screen of a critical windowserror. I don't know where to start to fix it. Thanks
Has anyone looked at or know of/about the Weibull Distribution? http://en.wikipedia.org/wiki/Weibull_distribution I was reading article on LED performance and the critical factors of current and heat. How they influence LED >xx% luminance life expectancy. ref: Philips Lumileds. Apparently is vip to...
so if you want to use the average range of the last 1000 bars of the current chart: sum(high-low)/n, how would you code this to use as a variable in your code? This would need to be adapted somehow.. for(int i=0; i<limit; i++) { CurrentHigh = iHigh(NULL,0,i); CurrentLow = iLow(NULL...
Dear Sir, do you know some code for calling price close at specific time? exmp; extern string Asia_Open = "02:00"; extern string Europe_Open = "08:00"; extern string LONDON_Open = "10:00"; extern string US_Open = "15:00";...
  lessons (1)
MetaTrader programming lessons Live trades every day Backtest
Moderator, has it been pulled ?
Dear Sir or Madam: I met a difficult problem when using MQL4 programming. I will deeply appreciate if you can offer me some suggestion, clue, or a solution. Thanks a lot. The problem is: how to update realtime and historic data with a MQL4 program. I need the latest data of at least 100 bars,...
  New Biggest Problem (15   1 2)
//+------------------------------------------------------------------+ //| nnnn.mq4 | //| Copyright © 2009, MetaQuotes Software Corp. | //| http://www.metaquotes.net |...
I'm trying to create an EA that will place a pending order X pips above the ask price. For example, on the daily EURUSD chart it checks when the price moves above the bar moves above a moving average and then sends the pending order 20 pips below the MA, i.e.; Ask: 1.42211, Buy would be 1.42231. Now...
Hi, I've been customizing a Pivot Points indicator and I think I need to get the calculations in a different way. The indicator uses a variable to set a "hours shift" from the server. For example: I use a server that show me the charts in GMT hour, so I set the indicator to calculate the pivot...
Hi All, Firstly, I would like to thank all the people who have helped others such as me.... Complete newbies! I have spent the last month or so using the forum to teach myself this MQL malarky but have now encountered an issue which is confusing me no end; MagicNumbers. I'm not looking for the code...
I developped an EA that out of 40 months historical data, tested month for month, on one broker (FXDD) shows 50+% profit/month. The mystery is that on another broker's hitorical data (that looks the same) (FXCM in the case) it performs utterly different, even with loss. How can 2 different broker's...
I am trying to code a module into an EA that would automatically take ascreenshot at each trade. Anybody knows how to do that and can guideme? I would appreciate it very much.
Full documentation of that indicators are included here: 'Indicator Taichi - a Simple Idea of Formalizing the Values of Ichimoku Kinko Hyo.' There are also included two indicators what I would like to insert into the Expert Advisor. Can anybody help me write the EA like this?
Hi, I have been trading forex for like a month (not long enough to make any assessment of my trading ability) and I have been messing around with EA's and doing stratagy tester on them and some of them get unrealistic gains in the stratagy tester for backtesting (like turning 10k into 100k in a...
Do banks control modeling quality? Or is it the MT4 finction? I used M5 frame and the EA was pretty successful on the old data (25% quality). But it stops being successful and begins to lose when I test it closer to modern data. Long research, but I found the dates of switch. In February 2009, the...