Download MetaTrader 5

MQL4 and MetaTrader 4 - page 266

To post a new topic, please log in or register
  Help with EA (5)
Hi  I have been looking everywhere to find an answer to my problem running an EA on a live account.  When I run it on the live account I get the error invalid lots amount for order send function.  I did not write the program and have limited knowledge of code.  I wanted to see if anyone could help....
When starting the terminal using an .ini file, the TestShutdownTerminal setting does not shut down the terminal. The .ini file below worked fine on previous versions: ExpertsEnable=false TestExpert=Moving Average Cross - Basic TestExpertParameters=mabasic.set TestSymbol=EURUSD TestPeriod=H1...
This code will draw an arrow over a candle.   ObjectCreate(StringConcatenate("DwnDSymblD",TimeCurrent()), OBJ_ARROW, 0, Time[0],vH); ObjectSet(StringConcatenate("DwnDSymblD",TimeCurrent()), OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN); ObjectSet(StringConcatenate("DwnDSymblD",TimeCurrent()), OBJPROP_COLOR,...
Hello,  I have an EA that needs to open positions at a specific time of day, which I want to set externally. This is the (simplified) structure of how I coded it: extern double OpenTime=1.59void OnTick()   {    double CurHour=Hour();    double CurMin=Minute();    double...
I think that traders should decide for themselves what timeframes they want to trade. Not mt4. how hard can it be to add timeframes like forextester 2  (picture).       
I want to be able to draw a series of lines, 30 pips apart, from the high of the day to the low.  The code below accomplishes this, but no matter where I put the code in my EA, some lines don't draw.  I think it's because of other objects being drawn.  If I keep compiling the code, I get different...
Hello, hello i want to know why MT4 has many different outputs in backtests? for example i test one EA with a profit possibilities of 10000$, the next day the EA is limited to 5000$ with the same parameter and timehorizon despite i didnt change anything in the code(or i am forgetful?) For Example...
GregorAnton
Does anyone have some tips for performance tuning Indicators / EAs?  I'm wondering if there are some basic dos and don'ts on speeding up performance.
Hello i have one question if someone can code for me simple Expert Advisor. The strategy of this Ea is very simple. I need ea which will be open position after the 1 at night (European Time) and if the 1 at night bar will be red it will be sell position or if bar will be green the ea will open buy...
I have been here in this site as part of my assignment. I was searching for some information to write in the essay. The assignment topic is related to database. I have gone through much information to write the assignment but could not find enough data. I also tried searching help who can write my...
APeng
Hello ! string time = "2014.11.10 22:10"; iBarShift(Symbol(),Period(),StrToTime(time),true) does not find the bar. But I can see the bar on the chart. The bar before the searched one ("2014.11.10 22:09") and the bar after it ("2014.11.10 22:11") is found without any problems.  And...
hi guys i have 10 opened charts and i'm using the code below to autoflip them. #import "user32.dll"   int GetParent(int hWnd);   int SendMessageA(int hWnd, int Msg, int wParam, int lParam);#import#define WM_MDINEXT   548extern int SlideShowSeconds = 5;void start(){   while (!IsStopped()) {      int...
GregorAnton
  Script DeInit (1)
Is there a DeInit type of handler for scripts?  I have a script that is in a loop until a condition is met.  It creates a text object to say "Script Running".  When the condition is met I can delete that objects.  HOWEVER, when I exit the script manually, the text object remains.  DeInit doesn't...
Hi all, Could someone provide a code to Flip Charts Automatically I don't want to click or press Ctrl+tab.... just got sick of it Cheers
My own personal views on backtesting in mt4 from strategy tester, historical data and optimization for expert advisors. When the average joe, who is savy with programming in various languages, comes to meta editor with the assumption that they should be able to use historical data to test their...
Hello, Just a quick question Is there a way to attach a screenshot to an email . Basically make the WindowScreenShot() function and the SendMail() function work together ? cheers, -J
TOPIC, please help if you can, godbless   
Hello, A couple of years ago I asked this same question (Not here) about renaming Chart Windows in MT4 and was told that it was not able to be done,. Just recently I was given an Indicator and a Template from a trading group that I am with, which does just that. The instruction that came with the...
I want to buy a mt4 server api...how can I buy MT4 710 build api..?then I want to test my API  how can I test..?
Hi guys, I just can´t find why my EA is showing this error when I use the Trailing Stop option. I am attaching here the code where I call the function Trailing Stop and then the function itself After that I am showing the messsages from the Alerts That I have inserted in the code In short, The...
Hello freinds, I need your help. I want the EA to check an operation every two minutes. The simple way is to do:   if (   TimeMinute(TimeCurrent()) != 2  && TimeMinute(TimeCurrent()) != 4  && TimeMinute(TimeCurrent()) != 6  && TimeMinute(TimeCurrent()) != 8  &&          TimeMinute(TimeCurrent()) !=...
Hallo, i tried to get the values of the REI by using iCustom(). But i dont get anything but Zero. double val=iCustom(NULL,0,"RangeExpansionIndex",1,1,0);   What is wrong and can anyone help me? Best Regards Alex 
Hi, My EA always needs to check the last close trade but whenever mt4 is closed and restarted it does not read the last trade. Any ideas how I can code my EA to check the last trades result even when the terminal is restarted?     double profit = 0;    datetime lastCloseTime = 0;    int cnt =...
Hi guys, I would like to know if it is possible to detect chart scroll. Whenever somebody scrolls right/left I would like to redraw my indicator. Any ideas how to do it? Thank you for reply!
I'm looking into developing an EA to trade the DAX or GER30, but when I attempt to run one of my more basic strategies on the DAX in the strategy tester, I find that I can't get it to download any Metaquotes data. I believe its using only the data provided by the broker FXCM. So can anyone confirm...
Hi, I can't figure out how to get the indicator to consider all the candles as opposed to only the ones which have come since i have opened the chart.    I've got pretty simple code for example's sake, just working with the close prices:  Any help really appreciated. Thanks void OnTick()  {//---...
Hello, I was wondering what's the difference between these 2 commands. Thanks for the help
where can i  find the souce code of  iVolume function ?
consegui baixar um indicador no MT4. mas nao consigo abrir o mesmo. qual o procedimento?
 It really isamazing the kitchen that I got from Stilhaus Kitchens. Stilhaus Kitchens Reviews