An interesting discussion guys but I still do not think this should be happening. I put the same code in an indicator and indeed the first value was always wrong then with subsequent 'ticks' the correct value was displayed.
The MT4 platform is notorious for its' poor data history compared to the brokers' customised trading platform. I can understand if you first opened a new MT4 platform you need to load history data to ensure you can make certain calculations and the traditional way of doing this is hold down the 'HOME' key on each timeframe until all data is loaded for M1 to MN1.
This should mean at this stage that the 'history' database for each timeframe is loaded. My concern is that the function MqlRates should store all data for all timeframes since we can ask it for any value at any time. This clearly is not the case....consistently anyway.
Also how sure can we be that if we are running an EA/Indicator on a particular timeframe but regularly asking for data values from other timeframes, that we are getting the correct values? What if you used the first value given (i.e on the first tick) for further calculations?
I know good coding says we need to check for successful completion like for OrderSend(), OrderSelect() etc; but how do we do this for simple in-built functions like iHigh()?
If we had to do this every time for these types of functions the programmes would be millions of lines long!
The Trade Manager Pro EA is a MetaTrader Expert Advisor that performs position management for you avoiding human errors and enhancing your trading activity.
Amazingly easy to use Trade easily from the chart Trade with precise risk management, hassle free Capital preservation is top priority Let profits run without your attention Enjoy risk-free trades as soon as possible Automatic trailing stops for all opened trades Initial stop losses are placed as soon as trades are
The EASIEST way to manage your risk for each trade!
Add the indicator to your chart, configure a risk percentage (of account equity) Enter the number of pips for your stop loss into the text entry field that appears on the chart The position size to take will automatically be updatedThe product features two modes - a compact mode which allows entry of stop loss pips and shows the resulting lot size based on the percent risk setting, as well as an expanded mode that also shows
The indicator displays in a separate window a price chart as bars or Japanese candlesticks with a periodicity below a minute.
Available periods (seconds): 30, 20, 15, 12, 10, 6, 5, 4, 3, 2, 1.
The display mode (bars or candlesticks) is switched by clicking on the chart.
Period in seconds - the period of bars in seconds Price levels count - the number of price levels on a chartBuffer number: 0 - Open, 1 - High, 2 - Low, 3 - Close, 4 - Color.
VirtualTradePad - is a contol panel for working with orders in МetaТrader 5 : buy, sell, buystop, buylimit, sellstop, selllimit, close, delete, modify, tralling stop.
VirtualTradePad won 2nd prize in the "Best Control Panel in the MQL5 Language" Contest.
The panel consists of 5 tabs.
VirtualTradePad PositionsStyle VirtualTradePad Ordersstyle VirtualTradePad SignalsStyleDemo version of the panel - VirtualTradePad LiteProfit or Loss PadINFO PadYou can also try this panel for
Easy Order is an Expert Advisor allowing you to enter any type of trade with one click based on your RISK preferences.
You can choose to enter a trade and automatically calculate your lot size based on how much of your account you want to risk. Risk is calculated based on your Stop Loss placement. You can use a fixed lot size if you don't want to use risk based calculation of lot size. Your previous setting of risk based or fixed lot size remains saved for your next use of this Expert Advi
Three variables are available for every strategy, any one of them can be disabled, their period can be changed.
type_order=ORDER_FILLING _FOK - order filling type.
ReverseTrade=false — trades opens in reverse direction if true. ExitOnBar=true — trades close on each bar only. spreadcover=false — Spread you pay includes in profit trades. It's like trade with zero spread but you should remember that it can decrease exact match between tester's result and live one. It
This software has no equals in the world and represents a universal trade "console" covering trading signals, automated market entry, setting of Stop Loss and Take Profit, as well as Trailing Profit for multiple trades at the same time in a single open window. Intuitive control of the Expert Advisor in "three clicks" ensures a comprehensive use of all its functions on different computers, including tablets PCs.
Interacting with additional signal indicators that mark the chart to give a real mar
Veno EA MT5 is a safe and fully automated medium-term trading robot.
The EA does NOT use hedging, martingale, grid strategies, arbitrage, etc.
Veno Expert System MT5 automatically monitors the appearance of participants with distinct preference towards buying or selling on the market. Trades are conducted on sharp cluster and news based movements of the market. The robot analyzes the market volumes and volatility, and follows strong supply and demand movements. It smoothly sets breakeven level
This indicator shows how much time is left on the current candle.
You have absolute control over appearance of remaining time label. Also, you can set additional flag to show remaining time in the comment section of your chart and how much time has already passed on the current candle measured in percents.
The indicator is based on the comparison of the correlation of trading instruments following an original algorithm. It determines the difference between correlated contracts (delta). The greater the difference, the more it is likely that this Delta will return to zero.
More suited to the FORTS market.
The greater the deviation from zero, the more it is likely that the price will return to zero. Also, the indicator divergence can be applied by comparing highs and lows.
This indicator gives full information about the market state: strength and direction of a trend, volatility and price movement channel. It has two graphical components:
Histogram: the size and the color of a bar show the strength and direction of a trend. Positive values show an ascending trend and negative values - a descending trend. Green bar is for up motion, red one - for down motion, and the yellow one means no trend. Signal line is the value of the histogram (you can enable divergence
Tick volume is equal to amount of ticks at the unit of time. There is direct correlation between tick volume and real amount of deals. Every change of the price is a result of a real request to perform a deal. Consequently, fewer requests we have, the less price changes we get, and, as a consequence, tick volume is smaller.
In this case, when big amount of requests appear on the market, price changes happen more often. Big tick volume appears. Tick volume is an important indicator of trad
IceFX VelocityMeter Mini is a very unique indicator on MetaTrader 4 platform which measures the speed of the Forex market. It is not a normal volume or other measurement indicator because IceFX VelocityMeter Mini is capable to understand market speed movements which are hidden in ticks and those valuable information cannot be read in an ordinary way from the candles.
The software monitors the received ticks (frequency, magnitude of change) within a specified time range, analyzes these info and
Fast Copy MT5 allows to copy trades between different MetaTrader 5 (netting)(hedge) and MetaTrader 4 accounts in any direction and amount, quickly and easily (without loading the system).
Any type of copying is available MT5 —> MT5 MT5 —> MT4 MT4 —> MT5 MT4 —> MT4
* For any interaction with the MT4, it is necessary to additionally install Fast Copy MT4
One tool for sending and receiving transactions: [master] > [slave] operation mode can be selected in th
The script is intended for automatic placing of Sell Stop pending orders, Stop Losses and Take Profits on the user specified levels. This script is not that useful as "Virtual pending buy stop", since short positions are opened as Bid price crosses the levels. Thus spread widening is not dangerous. Nevertheless, you need to have this script to prevent unwanted hitting of the Stop Loss levels.
Automation of the process of placing the Sell Stop pending orders, Stop Losses and T
The indicator is intended for determining the spread and swap size, the distance for setting stop orders and stop losses from the current price allowed and the risk per 1 point in the deposit currency.
The indicator informs a trader about possible additional expenses and profits connected with transferring a position to the next trade session of the financial instrument. It also informs about the spread size and the distance of pending orders, stop loss and trailing from the current price. In a
Trade Controller provides multiple methods to protect and maximize your profits. This powerful weapon helps you to set the protect and trailing-stop rules on your trade automatically in many effective methods. Once it is set and turned on, you don't need to monitor your orders anymore, the software will keep watching and control your orders with your predefined rules.
It's designed to support multi-protection and trailing strategy: Protect by break-even, protect by percentage, protect by pip, p
Monitoring and Trend Analysis
This product shows the trend strength levels based on 16 standard indicators, time periods and currency groups.
Depending on the current trend, the indicator colors change from green to red, allowing you to see the full picture.
Whatever your trading method and strategy are, you should always know, in which direction you are trading and what the probability of the trend change is. This indicator will help you answer these questions by calculating the
This is a panel for controlling the profit/loss in dollars, pips or % of balance. A new function for trailing profits has been implemented.
The panel can be used as a virtual Stop Loss or Take Profit.
It also features the emergency button - CLOSE ALL.
You can also try the full version of the VirtualTradePad for mt5 panel, as well as the Profit or Loss for mt4 panel
Other versions in this collection:
VirtualTradePad for mt5 Digit Market Time Pad Market Time Pad Scalper PadMain f
S2 Trend At Wavelet is designed to eliminate the noises on the Price Chart. A clear picture of the market flow will be seen due to the elimination of the unnecessary variations on the chart.
Capabilities of S2 Trend:
Chart End could be shifted to any desired point by Market End Line; A desired Scale could be used by selecting Scale Menu and the result will be shown on the chart; A separate diagram on the Main Chart could be shown by using Chart window's check box; Graphical representation
FULL Automatic is a fully autonomous trading robot for MetaТrader 5 without configurable parameters.
It is similar to SAFE Automatic robot intended for traders having no knowledge of trading basics. It works in Low, Medium, High and Extremal trading modes.
The EA applies modified versions of well-known strategies, including Elliott waves, following a trend, half-pyramiding, scalping, speculative trading with a double deposit protection. The EA switches the strategies automati
The script is intended for automatic placing of Buy Stop pending orders, Stop Losses and Take Profits on the user specified levels.
Avoiding unwanted entering a long position in case of false hitting the level as a result of widening of the spread by a dealing center. Avoiding unwanted triggering of a Stop Loss in case a quote pierces a significant level (fractal) without further confirmation with the close price. Setting a necessary virtual order and entering the market in
Linear Regressions Convergence Divergence is an oscillator indicator of a directional movement plotted as a difference of two linear regressions with lesser and greater periods. This is a further development of the ideas implemented in the standard MACD oscillator. It has a number of advantages due to the use of linear regressions instead of moving averages. The indicator is displayed in a separate window as a histogram. The signal line is a simple average of the histogram.
The histogram value
This panel is designed for quick and easy one-click trading. All you need to do is to set up all the necessary parameters and enjoy trading! It supports two languages: English and Russian.
The panel consists of four parts:
1. Trade Window
Standard trading operations are conducted from this window: opening buy and sell trades. A trade is opened for he current symbol.
TakeProfit, StopLoss and Trailing stop can be set for each trade. To do this, mark an appropriate item. The values are entere
This indicator allows you to enjoy the two most popular products for analyzing request volumes and market deals at a favorable price:
Actual Depth of Market Chart Actual Tick Footprint Volume ChartThis product combines the power of both indicators and is provided as a single file.
The functionality of Actual COMBO Depth of Market AND Tick Volume Chart is fully identical to the original indicators. You will enjoy the power of these two products combined into the single super-indicator!
Who will be interested in this product:
those who are used to diversify the portfolio with a large number of pairs. those who work with a large number of orders those who trade news using pending orders (see the "Grid request" tab).The panel is designed to make managing a large number of orders as easy as managing one.
The currency pairs and order types for opening are formed here. The prices and stop levels are set.
User can define the price valu
Safe Automatic is a safe MetaТrader 5 trading robot working autonomously on a VPS server. The good results are achieved on EURUSD.
The EA applies modified versions of a trend-following strategy, half-pyramiding, scalping, Elliott Wave method and speculating trading with a deposit protection. The EA switches the strategies automatically. The robot does not trade at night from 10 p.m. to 4 a.m. (server time).
The robot was tested in the special tester on real ticks. Empirical e
FXG_Info – the most important data in one place.
MetaTrader 5 Indicator FXG_Info provides basic statistical information about a particular currency pair. So that in combination with a chart representing currency price it is easy to determine whether the current situation is good for trading. And when you open a position it will clearly show you the current data such as SL, TP, RR. You are not limited to currency. You can use any market which is provided by you broker.
The following information
News Loader Pro is a tool that automatically updates every economic news in real time with detailed information from several online data sources. It uses the unique technology to load data with full details from popular Forex websites. An alert will be sent to your mobile/email before an upcoming news release. Moreover, it also marks the news release points on the chart for further review and research.
In Forex trading, news is one of the important factors that move
AIIV EURUSD - Active Index Inflection Values EURUSD
The Indicator Shows:
The intensity and the direction of the movement of USD. The intensity and the direction of the movement of EUR. The inflection value of EURUSD.This indicator allows determining a state of inflection on the market with a delay of one-two candlesticks and a 60% precision (precision depends on the chart timeframe - the higher the timeframe, the more precise is the forecast).
AIIV is a series of indicators of inflection
Opening another chart and scrolling to the beginning ensures longer history only (the script alone will not load more than 2048 last bars for other timeframes).
I do not consider a problem checking consistency of data for a programmer. But there are additional problems involved:
- brokers have inconsistent primary data often
- loading the chart leaves large gaps in the history occasionally
- accessing other timeframe allocates additional buffers with the entire chart history (a copy of the original history), for every single script (i.e. you can easily hit memory limits)
the problem here, with checking successful completion, is that the wrong value of e.g. iHigh, can be anything, and not only zero, so there is no easy way to check for
Luckily there are some workarounds ; all I can find ATM, is to force a single ChartSetSymbolPeriod() inside on OnInit(), as follows
#property copyright " "
#property link " "
#property version " "
iHigh(NULL,PERIOD_M30,0); iHigh(NULL,PERIOD_MN1,0); /* examples of TFs */
ChartSetSymbolPeriod(0,NULL,0); singleton=1; /* if someday program hangs, we may put singleton=1 first */
int singleton; /* a global variable - if #property strict is used, it has to be int singleton=0; */
/* so , TFs will be available now, on first call of e.g. OnTimer */
After all , a remark is MQL is supporting nameless functions (the headless block which contains iHigh calls above)
edit: the nameless block is eye candy only :)
edit 2 . Ok, once more, what i wrote is somehow useless :) there is no need for ChartSetSymbolPeriod(), as the effect is that the time passed between OnInit and OnTimer is enough for the asked prices (from iHigh) to be downloaded; so what someone needs is maybe have a Sleep() inside OnInit as to be more probable that the download will be finished by the time OnTimer or OnTick will be called
edit 3 . In Timeseries and Indicators Access/CopyRates we can read "If requested timeseries are not yet built or they need to be downloaded from the server, the function will immediately return -1". So maybe here is a clue as to how be certain if the history is present or not in our computers Or maybe RefreshRates
I still find the fact that we have to wait for the inadequate Mt4 platform to download history data unacceptable. I originally used ArrayCopyRates() in very my small programme and this did not show -1 (fail) but did still give the wrong data values!
Anyway, we are still discussing an even simpler programme which just uses iHigh(). For me whichever way you look at it if I use an in-built function like iHigh() I expect it to give correct results - loading databases is not rocket science - all other custom broker platforms (i.e FXCM's Trading Station) do not have this problem.
I know there are gaps in the history sometimes and you can physically see these on the chart - if I can physically see that the most recent bar (bar zero) is on the chart then I should be able to interrogate the statistics of that bar using iHigh(), iLow() etc. - for me this is very simple but very frightening that something so simple is so inconsistent.
There are many traps in MQL4 programmes but this should not be one of them!