Download MetaTrader 5

MQL4 and MetaTrader 4 - page 300

To post a new topic, please log in or register
Hi guys   Is it possible in an EA to detect if the broker is a FIFO regulated broker before opening any trades?   Thanks 
How many EAs can be run on the same chart at once? Can more than one EA run on same chart? Thanks. 
Hello, I'm trying to write a PinBar detector function for the current bar (index 0). The Pinbar_Bar() function will detect the pin bar based on the following assumption: h1= Height of the total bar (difference between current high and low) uc= Distance between open price and current high.  The...
Newbie here, I need help to download the renko charts on my mt4 platform. I tried to google and there were many instructions ie.to download the link and copy everything into the c: metrader / experts / indicators. But I can't find the folder with this directory at all. Anyone can help
Hello, i want to ask how you change your Sl & TP settings in a backtest over a longer time? I mean I personally cant always use RR for TP and SL (and because it makes the backtest very slow) because of the SL. I tried it with this code: //ATRdouble atr_Ref = iATR(Symbol(),PERIOD_D1,ATR...
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...
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,ShiftLong,PeriodLong...
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 &&...
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...
  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...