MQL4 and MetaTrader 4 - page 1188

int start() { double ABUY=0; double ASELL=0; double BBUY=0; double BSELL=0; double point = MarketInfo(Symbol(),MODE_POINT); double expiration=CurTime()+PERIOD_D1*60; int n; int total= OrdersTotal(); for( n=0; n<total; n++ ){...
Is it the amount to ticks that take place within any given bar ?
Kindly assist me with coding of a very simple EA that checks that a certain condition is met across three time frames and sends alert either as long or short. Basically if value of stochs is between 20 and 30 at 15, 30 and 60 min timeframes then send alert long,,,, and if stochs is between 70 and 80
Hello, I want to get theNumber of bars from the actual time to 6 o'clock from the actual day. I thought I can use the iBarShift-Function, but what do I have to write for the "time-Parameter"?? iBarShift(NULL,0,6) Lot's of thanks, sunshineh
double Volume[] Series array that contains tick volumes of each bar of the current chart. does this hold the data about high, low, open and close ?
[Deleted]
Anyone else faced this problem before? I already backtest off-line to lock the spread, but for some unknown reason, my visual backtest result comes off significantly different from the non-visual. I also do not use Objects for entry/exit logic. Googled about it but nothing conclusive..
[Deleted]
Hello everybody! I concern myself on Forex,MetaTrader and backtesting for a few weeks. So I have not that much experienceabout that topic. I wrote a simple EA that goes long or short when one moving averageis crossing another one including a stop loss and a trailing take profit. Theresult of it,...
I'm trying to use a two-dimensional array, but I think I'm doing something wrong. My (global) declaration is: int LastExTime[2,4]; The problem is that LastExTime[1,1] keeps getting reset to zero and I'm sure it's not me doing it in code. I really can't see how it's happening - it works OK initially...
Hello freinds, May be, here is not the place for asking this, but I will try: I have an EA that run on my mobile P.C. 24h, but unforetunatly the MT4 platform shut down within any 3-4 hours (while the P.C. still ON) so I have to turn the EA ON every time. Does somebody know how to solve it, or let me...
MetaTrader 4 Client Terminal Build 388 Fixed generation of clients' trading reports.Fixed selection of a symbol in MarketWatch in case there are hidden selected symbols.Fixed an error with enabling-disabling of alerts in the alert creation dialog.Fixed terminal crash when closing it.Fixed work with...
New article Parallel Calculations in MetaTrader 5 is published: Time has been a great value throughout the history of mankind, and we strive not to waste it unnecessarily. This article will tell you how to accelerate the work of your Expert Advisor if your computer has a multi-core processor....
Hi, I use the OrderHistoryTotal() function in my scripts to output my trade data into a CSV file, but it appears that only recent trade data is processed unless I click the "All History" button in the "Account History" tab. I need the cumulative trade data in my CSV file, and I don't like having...
I am writing a simple custom indicator that is simply going to plot a line of the (high - close)/3. I have created the following: double H=high double L=low double x= H-L/3 I have three questions: 1.) Where do I place the I have been placing the variable at the top and get an error message about...
int start() { double ABUY=0; double ASELL=0; double BBUY=0; double BSELL=0; double point = MarketInfo(Symbol(),MODE_POINT); double expiration=CurTime()+PERIOD_D1*60; int n; int total= OrdersTotal(); for( n=0; n<total; n++ ){ // count how many open orders we have if( OrderSelect(n,SELECT_BY_POS...
[Deleted]
Hey! Whats with the mql4 search function? It won't look up anything I type in the search box. Instead I get this message "Keywords or characters in search string is ignored for they were too short or incorrect "? I get this no matter what I type in the search box.
Hi This function I have from another EA, and I am trying to insert it into my own EA, but when I do I get lots of errors, including "function definition unexpected". This is the function double getPipValue(double ord,int dir) { double val; RefreshRates(); if(dir == 1)...
I have heard differences of opinion on this.
[Deleted]
Hi, I have a problem with my trading Platform MetaTrader 4 in which appears a Gap in the chart with the historical data from the Period of January 14th to February 22th, in all the pairs, couldl you please contact me with this issue because i am stucked with my trading, please help me as soon as
[Deleted]
I'm having trouble passing a string to my DLL. The DLL function wants a char* for it's argument; however, I've tried passing it a string, and an initialized string array to no avail. I've changed the function to take a string array[255] and still nothing. How do you successfully pass a string...
here is the scenario... think at a once there are may be one open trade or set of open trades can be closed. so at that point i need to check at that time if account grows up or draw down. if it is a drawdown in next trade open (have a trail stop always). it should be increased the lotsize to cover...
hi, any tips on running a vps host for mt4 ? what would be ideal ram ? i am thinking about going with a "godaddy.com" deal : OS: Windows Server 2008 Standard 64-bit • RAM: 1 GB • Storage: 15 GB • Bandwidth: 500 GB/mo anybody know if this will be enough for running my EA with anywhere upto 500...
New article Building a Spectrum Analyzer is published at mql5.com: This article is intended to get its readers acquainted with a possible variant of using graphical objects of the MQL5 language. It analyses an indicator, which implements a panel of managing a simple spectrum analyzer using the...
  Renter  (307   1 2 3 4 5 ... 30 31)
Hello all! I have been allowed to use a deposit of X0 rubles for t months. Every month a fixed percentage q of the current value of the deposit X is deposited. I'm allowed to withdraw a percentage k from the account every month, but it doesn't exceed the value of q . So the task is to maximize the
I have coded the easiest, simplest EA,,, however the start () function does not trigger. The init() and deinit() functions work. The start will only work when called from within the init(),,, which only happens when loading the EA. What to do so to have the start function working well,,i.e upon an...
I want to write a function that i can input the periods and a price from a bar on the historical chart, so the function will output the value of where a moving average would have been when the price was at that level, I was thinking this must have been done before for analysing short period MA...
[Deleted]
Dear Forum Users, I have just started learning MQL4 via the MQL4 Book, and while mostly I have no problem understanding coding examples and concepts, this one has me a little confused... maybe I'm just tired and will look back at this and think it's silly I didn't understand such a simple concept,...
Can I call a function from inside another function ? Can I pass a function call as a variable ?
[Deleted]
Hello ! We programmed a custom indicator, which is doing several calculations. The Buffers 1 and 2 deliver correct values with the iCustom-function, Buffers 4 and 5 return values with iCustom, different from what the indicator shows in the chart window ! We tried several things, like using variables...
[Deleted]
Hi i have been trying to solve a problem with the strategy tester for the past few days but i now give up and ask you to help me. Problem: I am writing an EA and trying to test it with the strategy tester. What happens is that the results on the chart do not agree with the with either the data held...
Hello to All Thank you in the past for all your help. The help I have received is of course a learning experience for me, but in hopes that others will benefit from my mistakes. In this problem, an error occurs 'Function definition unexpected' appears after I have modified a previous known good code...