MQL4 and MetaTrader 4 - page 690

[Deleted]
Hi, im a new trader, using demo account in MT4. Yesterday i opened a trade with tp being set, and today morning i checked the chart and noticed that the graph has reached the take profit line multiple times but did not closed. Did i did something in the wrong way? Can someone help me understanding...
[Deleted]
I've noticed some strange behaviour with iMAOnArray() function. Maybe it is the function, but it could also be in the way EAs differ from indicators. Anyway... I was trying to incorporate the TDI indicator into an EA to give signals (rather than use iCustom and address the indicator directly, so...
I am writing a simple EA based on Moving Averages but my code returns zero values. It does not make sense to me. Can somebody help please? Here is the code that returns no values / or zeroes for the variables defined (MAlong, MAmedium and MAshort): MAlong = iMA ( NULL , 0
Hello I'm trying to do something simple, but it is eluding me due a toxic mix of a lack of knowledge and stupidity. With this piece of code, I'd like to print to the log a simple message, once a day, near the start of the day:  bool printed=true;{if(Hour() > 0)   printed=false;if(Hour()== 0 &&...
[Deleted]
I'm trying to identify candles where, a buy candle has more selling than buying, and a sell candle has more buying than selling.  I have the values , but drawing the arrows to mark the candle is a bit of a problem.  The following code is suppose to draw a green down arrow, on the high ,of a sell...
[Deleted]
  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....
[Deleted]
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...
[Deleted]
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,...
[Deleted]
In order to study cluster indicators , I wrote a program, which calculates the value of each currency based on the demand for it from other currencies in the market. We are considering a market of 8 currencies: USD, AUD, NZD, EUR, GBP, CAD, CHF, JPY Demand for each individual currency in this market
[Deleted]
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).       
[Deleted]
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...
[Deleted]
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...
[Deleted]
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...
[Deleted]
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...
[Deleted]
  iBarShift issue  (5)
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...
[Deleted]
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...
[Deleted]
  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...
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...
[Deleted]
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..?
  iCustom with REI  (4)
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 =
[Deleted]
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